Jump to content

Recommended Posts

Posted

I'm creating a mod to add a crop into the game. 

I ctrl+c ctrl+v the carrot.json from blocktypes, to use as a guide.

Seed ok, item ok, i can put in farmland, properties are working, stages are working, but the damn textures dont load.

2025-03-11_01-37-05.thumb.png.141a7944b3b62029fc3f72c4c229f63a.png

crop.json this is the crop file from blocktypes (duh)

stage1.json the file for the stage1, in my VS ModelCreator is working fine, the textures are in the correct folder

Somebody can enlighten me? What i did wrong?

Posted (edited)
4 hours ago, BrazilPirate said:

crop.json this is the crop file from blocktypes (duh)

stage1.json the file for the stage1, in my VS ModelCreator is working fine, the textures are in the correct folder

Somebody can enlighten me? What i did wrong?

On the first look crop.json looks fine. That depends, though, on where your files are located. Are you directly working in the game directory or your own mod directory?

If it is the latter, you have to adjust the texture definitions to point towards the game folder.

textures: {
		"e": { base: "game:block/plant/crop/potato/e{stage}" },
		"w": { base: "game:block/plant/crop/potato/w{stage}" },
	}

(Unless of course you copied the textures into your mod folders, but that wouldn't be necessary, as can be seen above.)

You should have errors in the logs (particularly client-main) pointing you towards the solution. This looks more like a shape than a texture error.

Also, the UV mapping of all your n and s faces seems to be messed up in your stage1.json file.

image.png.b3547b66b2c004eb1e929e33eb61e49e.png

Edited by Brady_The
Posted

Now the textures are correct in the stage1 json.

image.thumb.png.293ef523a1f7371bd69039ac675387c2.png

Nothing changed in game.

It is located in my own mod directory, i have a copy of the textures (and yes, i tested it with "game:" too). 

The warnings in my client-main are this:

image.thumb.png.cec6242699df5ffdfd9846d2b75602b7.png

Posted (edited)
39 minutes ago, BrazilPirate said:

It's a bit odd that no error messages are printed, but apparently it doesn't like your shape definition. (Thinking about it, I don't think I have ever seen a variantgroup reference in the type key. That's on me, my bad.)

You have two options:

shapeByType: {
		"*-2": { base: "block/plant/crop/potato/stage2" },
		"*-3": { base: "block/plant/crop/potato/stage3" },
		"*-4": { base: "block/plant/crop/potato/stage4" },
		"*-5": { base: "block/plant/crop/potato/stage5" },
		"*-6": { base: "block/plant/crop/potato/stage6" },
		"*-7": { base: "block/plant/crop/potato/stage7" },
		"*": { base: "block/plant/crop/potato/stage1" }
	}

or

shape: { base: "block/plant/crop/potato/stage{stage}" }

There's also the small problem that you are linking to the shape as followed: "block/plant/crop/potato/", but the "crop" folder is missing in your mod structure.

The shapes 2 to 7 also need some updates, mainly because you are defining only textures "e" and "w" in your blocktype, but shapes 2 to 7 also use texture "s" and "bulb".

Edited by Brady_The
  • Thanks 1
Posted
20 minutes ago, Brady_The said:

It's a bit odd that no error messages are printed, but apparently it doesn't like your shape definition.

You have two options:

shapeByType: {
		"*-2": { base: "block/plant/crop/potato/stage2" },
		"*-3": { base: "block/plant/crop/potato/stage3" },
		"*-4": { base: "block/plant/crop/potato/stage4" },
		"*-5": { base: "block/plant/crop/potato/stage5" },
		"*-6": { base: "block/plant/crop/potato/stage6" },
		"*-7": { base: "block/plant/crop/potato/stage7" },
		"*": { base: "block/plant/crop/potato/stage1" }
	}

or

shape: { base: "block/plant/crop/potato/stage{stage}" }

There's also the small problem that you are linking to the shape as followed: "block/plant/crop/potato/", but the "crop" folder is missing in your mod structure.

The shapes 2 to 7 also need some updates, mainly because you are defining only textures "e" and "w" in your blocktype, but shapes 2 to 7 also use texture "s" and "bulb".

The stage1 is the one that i adjusted correctly.

But this: ("block/plant/crop/potato/" without crop)

shape: { base: "block/plant/potato/stage{stage}" },

Resolved my problem. I was blind, and you sir gave me the sight. Thank you so much! 🤎

  • Like 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.