Update for 1.5.1, fixes some stupid bugs with hoppers.
This commit is contained in:
parent
48fd73c331
commit
a4669540b6
|
@ -58,12 +58,6 @@ public class BlockIronChest extends BlockContainer {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile()
|
||||
{
|
||||
return "/cpw/mods/ironchest/sprites/block_textures.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
|
@ -264,8 +258,10 @@ public class BlockIronChest extends BlockContainer {
|
|||
}
|
||||
return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ);
|
||||
}
|
||||
|
||||
|
||||
@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));
|
||||
}
|
||||
|
@ -273,7 +269,7 @@ public class BlockIronChest extends BlockContainer {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void func_94332_a(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
for (IronChestType typ: IronChestType.values())
|
||||
{
|
||||
|
|
|
@ -215,7 +215,7 @@ public enum IronChestType {
|
|||
int i = 0;
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,11 +35,12 @@ public class ItemChestChanger extends Item {
|
|||
setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@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
|
||||
|
@ -82,14 +83,14 @@ public class ItemChestChanger extends Item {
|
|||
chestContents[i] = null;
|
||||
}
|
||||
// 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
|
||||
tec.updateContainingBlockInfo();
|
||||
// Force the Chest TE to update any neighbours so they update next
|
||||
// tick
|
||||
tec.checkForAdjacentChests();
|
||||
// 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
|
||||
{
|
||||
|
|
|
@ -499,16 +499,14 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean func_94041_b(int i, ItemStack itemstack)
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_94042_c()
|
||||
public boolean isInvNameLocalized()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GUIChest extends GuiContainer {
|
|||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
// new "bind tex"
|
||||
mc.renderEngine.func_98187_b(type.guiTexture);
|
||||
mc.renderEngine.bindTexture(type.guiTexture);
|
||||
int x = (width - xSize) / 2;
|
||||
int y = (height - ySize) / 2;
|
||||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
|
|
Loading…
Reference in New Issue