Jump to content

Dynamic Textures in Model JSON


SirSavary

Recommended Posts

I am attempting to port a mod from 1.8.9 to to 1.11.2. While poking through the model JSON for the blocks in the mod, I've noticed that the textures are not explicitly defined (in the JSON). Instead, the JSON looks like this:

 

{
  "textures": {
    "particle": "#primary"
  }
}

 

The mod author also made use of other "variables", like #secondary and #tertiary. In the code, there are strings that match up to these properties (the mod simply re-uses Vanilla textures) but I can't quite figure out where the two connect. At no point in the code is there any sort of binding of textures, so I'm not entirely sure how it's even working.

 

My question is, how can I bind a value to a "variable" in the model JSON?

Link to comment
Share on other sites

"name": "name" // Initializing and declaring a variable

"secondName: ""#name" // Declaring a second variable and giving in the same value as the first using the first.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.

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...

×   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.

Announcements



×
×
  • Create New...

Important Information

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