Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Making it possible to use NBT to dicide the texture of the block.


Zyldra
 Share

Recommended Posts

I'm building a drop that contains the TileEntity of a block.

 

I already have the itemstack giving the name like this:

 

        @Override

        public String getItemStackDisplayName(ItemStack is)

{

NBTTagCompound nbtb = new NBTTagCompound();

nbtb = is.stackTagCompound;

if(nbtb != null)

{

String name = nbtb.getString("WrenchDrop_NAME");

if(name != null)

{

return name;

}

}

return "No Block";

}

 

I need some way to give the Block a texture bassed on the NBT when it is in a ItemStack (in inventory of player).

 

Thanks if you can make it possible :)

Link to comment
Share on other sites

You can, either use a ISpecialBlockRenderHandler or a TileEntityRenderer.

'Normal' blocks do not have any of that extra metadata so we can't pass it into them.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to comment
Share on other sites

You can, either use a ISpecialBlockRenderHandler or a TileEntityRenderer.

'Normal' blocks do not have any of that extra metadata so we can't pass it into them.

 

Where can I find the >ISpecialBlockRenderHandler<?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.