Jump to content

[1.10] Block texture from tile entity data


Recommended Posts


I'm fairly new to modding in 1.10 and especially with Block States. I would like to copy the texture of a block contained in a tile entity to my block. For example if I put a stone block into my tile entity, I would like my block to change its texture to match the stone texture. Is there any way to do that ?



Link to comment
Share on other sites

1 hour ago, FuzeIII said:

Could you just explain what do you mean by unlisted properties ?


Regular properties are represented by an IProperty and have a fixed set of values of a type that implements Comparable (e.g. the two booleans, a range of ints or a set of enum values). These can be stored in metadata or set in Block#getActualState and can be used to determine which model is used for the IBlockState.


Unlisted properties are represented by an IUnlistedProperty and can have any number of values (e.g. any float or any object of the specified type), with IUnlistedProperty#isValid being used to determine whether or not a value is valid. These must be set from Block#getExtendedState and can be used by the IBakedModel to change how it's rendered.


To use unlisted properties, you need to return an ExtendedBlockState from Block#createBlockState instead of a BlockStateContainer. If you use BlockStateContainer.Builder to create the state container, you don't need to worry about using the right class for your properties, it will create an ExtendedBlockState if you've added unlisted properties or a BlockStateContainer if you haven't.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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