Jump to content

wnx

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by wnx

  1. Hi! I have a slight problem. I need to get side of block that player is looking at, in format 0-5. PS: I don't mean player direction, that I can get like this: int playerDirection = MathHelper.floor_double((double)((minecraftInstace.getMinecraft().thePlayer.rotationYaw * 4F) / 360F) + 0.5D) & 3; Thanks for any help.
  2. Thanks! I have fixed it using ItemRenderer.
  3. I allready have custom ItemBlock for my Block, I am using it to display tooltip that shows IDs of texture on sides (from NBT) of my Block. I have tryed to @Override getIcon, but doesn't work for me.
  4. But that limits my options to 16 states. I have 4 types of texture, that can be on any side in any combination. That is about 1296 combinations already, I can't use metadata.
  5. Hi, I have a problem, I have a block and I am storing data about side texture at TileEntity, when Block is in inventory texture data are stored in NBT data of ItemBlock. When block is placed in the world, everything works fine, but I can't figure out how to get rendering at inventory/hand working, I know that i can use public IIcon getIcon(int side, int meta) in block, but I don't have acess to ItemStack/ItemBlock, so I can't get data from NBT. I tryed a couple of methods in ItemBlock like public IIcon getIcon(ItemStack stack, int pass) but it also did not work ... Thanks for any help! getIcon of my Block (this works) public IIcon getIcon(IBlockAccess blockAcess, int x, int y, int z, int side) { TileEntityMW te = (TileEntityMW) blockAcess.getTileEntity(x, y, z); if(te != null){ return sideTextures[te.getSideTexture(side)]; } else { return null; } } I can use this or blockIcon to set Icon of block, this works in inventory/hand but I can't get data from TileEntity/ItemStack @Override public IIcon getIcon(int side, int meta) { return sideTexture[0]; }
×
×
  • Create New...

Important Information

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