Jump to content

Keiji Tadashi

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Keiji Tadashi's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Because getIcon() is undefined for ItemStack.
  2. I am trying to make a block that has a texture on one side that updates if your right click the block while you have a block in you hand. But I want to have it update only that one block. Right now it is updating all those blocks in the world and when logging restarting minecraft the are back to the old texture again. I know I have to use tileenities for this but I don't know what how you save or load an icon. I am not a very experienced programmer or modder. Here is the code that changes the texture when you right click on it. (sorry but 'spoiler' and 'insert code' don't seem to work) public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int metadata, float a, float b, float c) { TileEntity te = world.getBlockTileEntity(x, y, z); if (player.getHeldItem() == null){ return super.onBlockActivated(world, x, y, z, player, metadata, a, b, c); } else if (player.getHeldItem().getItem() instanceof ItemBlock) { camouflageIcon = player.getHeldItem().getIconIndex(); return true; } else { return super.onBlockActivated(world, x, y, z, player, metadata, a, b, c); } }
  3. Thank you, it seems to be working There are some other bugs now but I think I can work them out on my own.
  4. I am new to modding and don't have much codding experience. I am trying to have a block change it's texture on one side to the block the player is holding if the player rightclicks on the block. But right now it just places the block you hold in your hand like it normally would and doesn't change the texture. This is the code I have so far but I don't know what I should do to make it work. Any help would be appreciated, Thank you.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.