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

I'm trying to make a column block that has random textures on all four of its sides. The closest I've been able to get with this is by choosing a random model from the blockstate like this:

{
  "variants":{
    "axis=y":[{"model":"modid:block/model1","weight":2},
    {"model":"modid:block/model2","weight":2},
    {"model":"modid:block/model3","weight":1}],
    "axis=z":[{"model":"modid:block/model1","weight":2,"x":90},
    {"model":"modid:block/model2","weight":2,"x":90},
    {"model":"modid:block/model3","weight":1,"x":90}],
    "axis=x":[{"model":"modid:block/model1","weight":2,"x":90,"y":90},
    {"model":"modid:block/model2","weight":2,"x":90,"y":90},
    {"model":"modid:block/model3","weight":1,"x":90,"y":90}]
  }
}

This, however, results in the models being picked randomly, but the textures on their sides are all the same. I thought I could try changing the block model to look similar to my blockstate, but either it's not possible, or I cannot seem to get the formatting right... Any help? Here's what I've got so far on my block model for reference.

{
  "parent":"block/cube_column",
  "textures":{
    "end":"modid:blocks/texture_top",
    "side":[{"textures":"modid:blocks/texture_side1","weight":2},
    {"textures":"modid:blocks/texture_side2","weight":2},
    {"textures":"modid:blocks/texture_side3","weight":1}]
  }
}

Thanks in advance!

Howdy

You could perhaps use a multipart block, similar to this

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/resources/assets/minecraftbyexample/blockstates/mbe03b_block_3dweb_registry_name.json

One multipart for each side, always true (so that all four sides show), with a random block model for each side.  If multipart lets you use random models for each part, that will probably give you what you want.

 

If that doesn't work, you could use a dynamic blockmodel

eg working examples here (but much more complicated than just using blockstate)

https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe04_block_dynamic_block_models

 

-TGG

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.