Posted March 6, 20178 yr Hi, 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 ? Thanks
March 6, 20178 yr Author Wow, way more complicated than in 1.7 ^^" I'll try that Could you just explain what do you mean by unlisted properties ? Edited March 6, 20178 yr by FuzeIII
March 6, 20178 yr 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.
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.