Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

(SOLVED) [1.14.4] BlockState Json


MineModder2000
 Share

Recommended Posts

I'm confused on what the exact syntax should be :

 

{
    "variants": {
    	"lit=true": {"model": "mymod:block/green_torch"}
		"lit=false": {"model": "mymod:block/burnt_torch"}
    }
}

 

GreenTorch extends TorchBlock, and uses BlockStateProperties.LIT. I know how to set properties, and have confirmed that is all working. But with the above, and the model files correctly pointing to textures, I get the magenta / black box. 

 

Oh I forgot the comma after the bracket.......... ?‍♂️

Edited by MineModder2000
Link to comment
Share on other sites

New question, how do I use the same model for all states, but change only the texture? I've tried this

 

{
	"defaults": {
		"model": {"block/torch"}
	},
    "variants": {
    	"lit=true": {"texture": "mymod:block/green_torch"},
		"lit=false": {"texture": "mymod:block/burnt_torch"}
    }
}

 

Edited by MineModder2000
Link to comment
Share on other sites

1 hour ago, MineModder2000 said:

New question, how do I use the same model for all states, but change only the texture?

You still need a separate model for each, but sub models can override textures from their parent.

  • Thanks 1

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

By the way, format your damn json files. Christ.

This should be a straight line:

image.png.c09fda93ad2e862bbd9072084bf6ed9b.png

  • Haha 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

1 hour ago, MineModder2000 said:

? This is just the copy paste I swear, I don't know why it does that. My json files are neat, I have OCD so I wouldn't tolerate that. 

Probably spaces vs. tabs

Yeah, the lit-false line has two tabs, the lit-true is one tab and several spaces.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

16 hours ago, Draco18s said:

Probably spaces vs. tabs

Choose one style (tabs) and have your editor replace all occurrences of the other style with your preferred style. Also be sure to tell everyone that your style is superior at every opportunity.

  • Haha 1

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

4 hours ago, Cadiboo said:

Choose one style (tabs) and have your editor replace all occurrences of the other style with your preferred style. Also be sure to tell everyone that your style is superior at every opportunity.

Tabs are superior because when you backspace it removed the entire tab. Ergo it is the only correct way (also tabs are exactly 4 spaces wide and every other width is wrong).

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

If your IDE does not remove 4 spaces using one backspace press it is time to get a new IDE.

I have other issues (such as trying to highlight multiple lines so that when I do a delete, the "head" of the line ends up in the right spot), but the backspace thing is common to nearly all IDEs I've ever used.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

6 minutes ago, Draco18s said:

I have other issues (such as trying to highlight multiple lines so that when I do a delete, the "head" of the line ends up in the right spot), but the backspace thing is common to nearly all IDEs I've ever used.

I don't know what you are doing, but I have never been able to detect a difference in my IDEs behavior between using spaces and using tabs.

But... you do you.

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.

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.