Fixed it so you can set the meta of the key stack for the meteors.
This commit is contained in:
parent
4c79a4f2ff
commit
abfc7b13b6
|
@ -27,18 +27,18 @@ public class MeteorHolder
|
||||||
|
|
||||||
public int maxWeight = 1000;
|
public int maxWeight = 1000;
|
||||||
|
|
||||||
public ItemStack getKeyStack()
|
public ItemStack getKeyStack(int meta)
|
||||||
{
|
{
|
||||||
Item item = Utils.getItem(resourceKey);
|
Item item = Utils.getItem(resourceKey);
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
return new ItemStack(item);
|
return new ItemStack(item, 1, meta);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
Block block = Utils.getBlock(resourceKey);
|
Block block = Utils.getBlock(resourceKey);
|
||||||
if (block != null)
|
if (block != null)
|
||||||
{
|
{
|
||||||
return new ItemStack(block);
|
return new ItemStack(block, 1, meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class ModMeteors
|
||||||
MeteorHolder holder = gson.fromJson(properString, MeteorHolder.class);
|
MeteorHolder holder = gson.fromJson(properString, MeteorHolder.class);
|
||||||
if (holder != null)
|
if (holder != null)
|
||||||
{
|
{
|
||||||
MeteorRegistry.registerMeteor(holder.getKeyStack(), holder);
|
MeteorRegistry.registerMeteor(holder.getKeyStack(holder.metaKey), holder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue