Update for 1.5.1, fixes some stupid bugs with hoppers.

This commit is contained in:
Christian 2013-03-22 15:30:32 -04:00
parent 48fd73c331
commit a4669540b6
5 changed files with 14 additions and 19 deletions

View File

@ -58,12 +58,6 @@ public class BlockIronChest extends BlockContainer {
return null; return null;
} }
@Override
public String getTextureFile()
{
return "/cpw/mods/ironchest/sprites/block_textures.png";
}
@Override @Override
public boolean isOpaqueCube() public boolean isOpaqueCube()
{ {
@ -264,8 +258,10 @@ public class BlockIronChest extends BlockContainer {
} }
return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ); return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ);
} }
@Override @Override
public int func_94328_b_(World par1World, int par2, int par3, int par4, int par5) public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5)
{ {
return Container.func_94526_b((TileEntityIronChest) par1World.getBlockTileEntity(par2, par3, par4)); return Container.func_94526_b((TileEntityIronChest) par1World.getBlockTileEntity(par2, par3, par4));
} }
@ -273,7 +269,7 @@ public class BlockIronChest extends BlockContainer {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void func_94332_a(IconRegister par1IconRegister) public void registerIcons(IconRegister par1IconRegister)
{ {
for (IronChestType typ: IronChestType.values()) for (IronChestType typ: IronChestType.values())
{ {

View File

@ -215,7 +215,7 @@ public enum IronChestType {
int i = 0; int i = 0;
for (String s : sideNames) for (String s : sideNames)
{ {
icons[i++] = par1IconRegister.func_94245_a(String.format("ironchest:%s_%s",name().toLowerCase(),s)); icons[i++] = par1IconRegister.registerIcon(String.format("ironchest:%s_%s",name().toLowerCase(),s));
} }
} }
} }

View File

@ -35,11 +35,12 @@ public class ItemChestChanger extends Item {
setCreativeTab(CreativeTabs.tabMisc); setCreativeTab(CreativeTabs.tabMisc);
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister par1IconRegister) public void updateIcons(IconRegister par1IconRegister)
{ {
this.iconIndex = par1IconRegister.func_94245_a("ironchest:"+type.itemName); this.iconIndex = par1IconRegister.registerIcon("ironchest:"+type.itemName);
} }
@Override @Override
@ -82,14 +83,14 @@ public class ItemChestChanger extends Item {
chestContents[i] = null; chestContents[i] = null;
} }
// Clear the old block out // Clear the old block out
world.setBlockAndMetadataWithNotify(X, Y, Z, 0, 0, 3); world.setBlock(X, Y, Z, 0, 0, 3);
// Force the Chest TE to reset it's knowledge of neighbouring blocks // Force the Chest TE to reset it's knowledge of neighbouring blocks
tec.updateContainingBlockInfo(); tec.updateContainingBlockInfo();
// Force the Chest TE to update any neighbours so they update next // Force the Chest TE to update any neighbours so they update next
// tick // tick
tec.checkForAdjacentChests(); tec.checkForAdjacentChests();
// And put in our block instead // And put in our block instead
world.setBlockAndMetadataWithNotify(X, Y, Z, block.blockID, newchest.getType().ordinal(), 3); world.setBlock(X, Y, Z, block.blockID, newchest.getType().ordinal(), 3);
} }
else else
{ {

View File

@ -499,16 +499,14 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
} }
@Override @Override
public boolean func_94041_b(int i, ItemStack itemstack) public boolean isStackValidForSlot(int i, ItemStack itemstack)
{ {
// TODO Auto-generated method stub return true;
return false;
} }
@Override @Override
public boolean func_94042_c() public boolean isInvNameLocalized()
{ {
// TODO Auto-generated method stub
return false; return false;
} }
} }

View File

@ -75,7 +75,7 @@ public class GUIChest extends GuiContainer {
{ {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
// new "bind tex" // new "bind tex"
mc.renderEngine.func_98187_b(type.guiTexture); mc.renderEngine.bindTexture(type.guiTexture);
int x = (width - xSize) / 2; int x = (width - xSize) / 2;
int y = (height - ySize) / 2; int y = (height - ySize) / 2;
drawTexturedModalRect(x, y, 0, 0, xSize, ySize); drawTexturedModalRect(x, y, 0, 0, xSize, ySize);