Update for 1.5 texturing changes
|
@ -41,7 +41,7 @@ public class BlockIronChest extends BlockContainer {
|
|||
public BlockIronChest(int id)
|
||||
{
|
||||
super(id, Material.iron);
|
||||
setBlockName("IronChest");
|
||||
setUnlocalizedName("IronChest");
|
||||
setHardness(3.0F);
|
||||
setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
random = new Random();
|
||||
|
@ -79,7 +79,7 @@ public class BlockIronChest extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int metadata)
|
||||
public TileEntity createTileEntity(World world, int metadata)
|
||||
{
|
||||
return IronChestType.makeEntity(metadata);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
******************************************************************************/
|
||||
package cpw.mods.ironchest;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -18,6 +19,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemChestChanger extends Item {
|
||||
|
||||
|
@ -28,10 +31,17 @@ public class ItemChestChanger extends Item {
|
|||
super(id);
|
||||
setMaxStackSize(1);
|
||||
this.type = type;
|
||||
setItemName(type.itemName);
|
||||
setUnlocalizedName(type.itemName);
|
||||
setCreativeTab(CreativeTabs.tabMisc);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void func_94581_a(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.func_94245_a("ironchest:"+type.itemName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int X, int Y, int Z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ public class ItemIronChest extends ItemBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getItemNameIS(ItemStack itemstack)
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return IronChestType.values()[itemstack.getItemDamage()].name();
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void receiveClientEvent(int i, int j)
|
||||
public boolean receiveClientEvent(int i, int j)
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
|
@ -329,6 +329,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
|||
facing = (byte) (j & 0x7);
|
||||
numUsingPlayers = (j & 0xF8) >> 3;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -73,9 +73,9 @@ public class GUIChest extends GuiContainer {
|
|||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
||||
{
|
||||
int tex = mc.renderEngine.getTexture(type.guiTexture);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(tex);
|
||||
// new "bind tex"
|
||||
mc.renderEngine.func_98187_b(type.guiTexture);
|
||||
int x = (width - xSize) / 2;
|
||||
int y = (height - ySize) / 2;
|
||||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
|
|
|
@ -168,7 +168,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
|||
glTranslatef(shiftX, shiftY, shiftZ);
|
||||
glRotatef(timeD, 0.0F, 1.0F, 0.0F);
|
||||
glScalef(blockScale, blockScale, blockScale);
|
||||
customitem.func_92058_a(item);
|
||||
customitem.setEntityItemStack(item);
|
||||
itemRenderer.doRenderItem(customitem, 0, 0, 0, 0, 0);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 418 B |
After Width: | Height: | Size: 466 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 480 B |