update all mappings but one for latest FML

This commit is contained in:
Progwml6 2014-09-30 20:53:12 -04:00
parent 0e3aeb0051
commit 4e1b452bde
4 changed files with 12 additions and 11 deletions

View File

@ -44,7 +44,7 @@ public class BlockIronChest extends BlockContainer
{ {
super(Material.iron); super(Material.iron);
this.setDefaultBlockState(this.blockState.getBaseState().withProperty(VARIANT_PROP, IronChestType.IRON)); this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT_PROP, IronChestType.IRON));
this.setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); this.setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
this.setHardness(3.0F); this.setHardness(3.0F);
@ -114,13 +114,13 @@ public class BlockIronChest extends BlockContainer
} }
@Override @Override
public IBlockState getBlockStateFromMeta(int meta) public IBlockState getStateFromMeta(int meta)
{ {
return this.getDefaultBlockState().withProperty(VARIANT_PROP, IronChestType.values()[meta]); return this.getDefaultState().withProperty(VARIANT_PROP, IronChestType.values()[meta]);
} }
@Override @Override
public int getMetaFromBlockState(IBlockState blockState) public int getMetaFromState(IBlockState blockState)
{ {
return ((IronChestType)blockState.getValue(VARIANT_PROP)).ordinal(); return ((IronChestType)blockState.getValue(VARIANT_PROP)).ordinal();
} }

View File

@ -20,7 +20,7 @@ public class ItemIronChest extends ItemBlock
{ {
super(block); super(block);
this.setMaxDurability(0); this.setMaxDamage(0);
this.setHasSubtypes(true); this.setHasSubtypes(true);
} }

View File

@ -49,8 +49,8 @@ public class RegistryHelper
while (iterator.hasNext()) while (iterator.hasNext())
{ {
IBlockState iblockstate = (IBlockState)iterator.next(); IBlockState iblockstate = (IBlockState)iterator.next();
int id = Block.blockRegistry.getIDForObject(block) << 4 | block.getMetaFromBlockState(iblockstate); int id = Block.blockRegistry.getIDForObject(block) << 4 | block.getMetaFromState(iblockstate);
Block.field_176229_d.func_148746_a(iblockstate, id); Block.BLOCK_STATE_IDS.put(iblockstate, id);
} }
return block; return block;

View File

@ -208,13 +208,13 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
} }
@Override @Override
public String getCommandSenderName() public String getName()
{ {
return this.hasName() ? this.customName : type.name(); return this.hasCustomName() ? this.customName : type.name();
} }
@Override @Override
public boolean hasName() public boolean hasCustomName()
{ {
return this.customName != null && this.customName.length() > 0; return this.customName != null && this.customName.length() > 0;
} }
@ -271,7 +271,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
nbttagcompound.setTag("Items", nbttaglist); nbttagcompound.setTag("Items", nbttaglist);
nbttagcompound.setByte("facing", (byte)facing); nbttagcompound.setByte("facing", (byte)facing);
if (this.hasName()) if (this.hasCustomName())
{ {
nbttagcompound.setString("CustomName", this.customName); nbttagcompound.setString("CustomName", this.customName);
} }
@ -570,4 +570,5 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
{ {
return "IronChest:" + type.name(); return "IronChest:" + type.name();
} }
} }