Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 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 by FuzeIII

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.