Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted
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)

Posted

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.

Posted
16 minutes ago, Draco18s said:

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

This should be a straight line:

image.png.c09fda93ad2e862bbd9072084bf6ed9b.png

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

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

Posted
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)

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

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

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.