-
Posts
53 -
Joined
-
Last visited
Posts posted by Xander402
-
-
Hello,
I'm going to add iron ladders to my mod.
I created a class:
package ... import ... public class BlockIronLadder extends BlockLadder { public BlockIronLadder() { setUnlocalizedName("iron_ladder"); setRegistryName("iron_ladder"); BlockInit.BLOCKS.add(this); ItemInit.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); } }
And called it in my BlockInit:
public static final Block IRON_LADDER = new BlockIronLadder();
And successfully registered the block and the item to the game.
I also created all of the following JSON files:
assets/blockstates/iron_ladder.json
{ "variants": { "facing=north": { "model": "iron_ladder" }, "facing=east": { "model": "iron_ladder", "y": 90 }, "facing=south": { "model": "iron_ladder", "y": 180 }, "facing=west": { "model": "iron_ladder", "y": 270 } } }
assets/models/block/iron_ladder.json
{ "ambientocclusion": false, "textures": { "particle": "blocks/iron_ladder", "texture": "blocks/iron_ladder" }, "elements": [ { "from": [ 0, 0, 15.2 ], "to": [ 16, 16, 15.2 ], "shade": false, "faces": { "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }, "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" } } } ] }
assets/models/item/iron_ladder.json
{ "parent": "item/generated", "textures": { "layer0": "blocks/iron_ladder" } }
...and the texture:
assets/textures/blocks/iron_ladder.png
I added a record to the lang file as well:tile.iron_ladder.name=Iron Ladder
The ladder works fine, but shows up as...
a pink-black cube with the texture_name#variant_name
[06:56:04] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [06:56:04] [main/ERROR] [TEXTURE ERRORS]: The following texture errors were found. [06:56:04] [main/ERROR] [TEXTURE ERRORS]: ================================================== [06:56:04] [main/ERROR] [TEXTURE ERRORS]: DOMAIN minecraft [06:56:04] [main/ERROR] [TEXTURE ERRORS]: -------------------------------------------------- [06:56:04] [main/ERROR] [TEXTURE ERRORS]: domain minecraft is missing 1 texture [06:56:04] [main/ERROR] [TEXTURE ERRORS]: domain minecraft has 3 locations: [06:56:04] [main/ERROR] [TEXTURE ERRORS]: unknown resourcepack type net.minecraft.client.resources.DefaultResourcePack : Default [06:56:04] [main/ERROR] [TEXTURE ERRORS]: unknown resourcepack type net.minecraft.client.resources.LegacyV2Adapter : FMLFileResourcePack:Forge Mod Loader [06:56:04] [main/ERROR] [TEXTURE ERRORS]: unknown resourcepack type net.minecraft.client.resources.LegacyV2Adapter : FMLFileResourcePack:Minecraft Forge [06:56:04] [main/ERROR] [TEXTURE ERRORS]: ------------------------- [06:56:04] [main/ERROR] [TEXTURE ERRORS]: The missing resources for domain minecraft are: [06:56:04] [main/ERROR] [TEXTURE ERRORS]: textures/blocks/iron_ladder.png [06:56:04] [main/ERROR] [TEXTURE ERRORS]: ------------------------- [06:56:04] [main/ERROR] [TEXTURE ERRORS]: No other errors exist for domain minecraft [06:56:04] [main/ERROR] [TEXTURE ERRORS]: ================================================== [06:56:04] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Am I missing something..? Well, surely I do, but what is it...?
Thanks in advance!
Texture&model problem with making ladders
in Modder Support
Posted
Thank you! That is actually something that I've done before.. but it was really long time ago and I have to learn it all again...
Anyway, the ladder looks good now, but only when placed. The held item is still a pink-black cube.
I tried linking the texture under assets/textures/blocks/iron_ladder.png, then I tried to copy the texture to assets/textures/items/iron_ladder.png and linking that copy
I also played with the "parent", setting it to "block/block", "item/generated", "item/item"...
but the big pink-black cube still shows up in my square hand and I really have no clue how to solve it
The only thing I changed in my code was adding the namespace with the mod ID