Jump to content

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


Zyldra

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.
Consider supporting the team on Patreon

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.

Announcements



×
×
  • Create New...

Important Information

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