Changed hardcoded 1 to EnumControllerType.CREATIVE.getId()
This commit is contained in:
@@ -21,7 +21,7 @@ public class ItemBlockController extends ItemBlockBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b) {
|
||||||
EnumControllerType type = stack.getMetadata() == 1 ? EnumControllerType.CREATIVE : EnumControllerType.NORMAL;
|
EnumControllerType type = stack.getMetadata() == EnumControllerType.CREATIVE.getId() ? EnumControllerType.CREATIVE : EnumControllerType.NORMAL;
|
||||||
|
|
||||||
int energyStored = 0;
|
int energyStored = 0;
|
||||||
int capacity = TileController.ENERGY_CAPACITY;
|
int capacity = TileController.ENERGY_CAPACITY;
|
||||||
@@ -50,7 +50,7 @@ public class ItemBlockController extends ItemBlockBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack initNBT(ItemStack stack) {
|
public static ItemStack initNBT(ItemStack stack) {
|
||||||
EnumControllerType type = stack.getMetadata() == 1 ? EnumControllerType.CREATIVE : EnumControllerType.NORMAL;
|
EnumControllerType type = stack.getMetadata() == EnumControllerType.CREATIVE.getId() ? EnumControllerType.CREATIVE : EnumControllerType.NORMAL;
|
||||||
NBTTagCompound tag = stack.getTagCompound();
|
NBTTagCompound tag = stack.getTagCompound();
|
||||||
if(tag == null) tag = new NBTTagCompound();
|
if(tag == null) tag = new NBTTagCompound();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user