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

As the topic states, what is the proper way for the subblocks? I have a block which changes facing and I'm trying to create subblocks of it for each vanilla wood type. So, 4 directions and 6 wood types result in 24 different metadata. But as far as I know, metadata only support up to 16.

I can think of two ways to solve it:

1 - I can separate them like logs, which results in 2 different blocks, first for oak, spruce, birch, jungle and second for acacia and dark oak.
2 - I can create a unique block for each wood variant and save the metadata for only facing.

I'm interested in brief explanations of why one would be better than the other.

Also, if you have a more proper than both of the ways, I would like to hear it. Thanks in advance.

Separating them into 2 blocks creates a lot of confusion since your will have 2 meaningless blocks (BlockThingOne and BlockThingTwo). That said this way is pretty good if you want to save on block ids.

Creating a unique block for each variant is a more intuitiva approach. This is also how variants function in 1.13. So this approach will allow you to update your mod to 1.13 easier and is more intuitive but it's less conservative on block ids.

Alternatively you can store all your variants in a single block by using a TileEntity. Since TEs can be non-tickable now this approach is also viable.

Actually, since you're starting this now and 1.13 is getting close I would suggest taking the same approach and making it fully "flat" -- separate block for every variant. The way 1.13 seems to be going is that properties like facing orientation will still be applied to blocks but all the different types of wood will be their own block. I am not sure the entire motivation but I'd bet it is because the combination of variants with other states simply runs out of room with the 4-bit per block position "metadata". So instead of doing a half-assed approach like having two log blocks each with multiple variants just go all the way and make every variant its own thing.

 

For more on the 1.13 approach see: https://minecraft.gamepedia.com/1.13/Flattening

 

It will make your transition to 1.13 a LOT easier if you go ahead and flatten now.

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.