Hi, i am currently trying to learn modding by following Mr.Crayfishs Youtube Tutorial.
I have started adding my own items, currently i have 2 implemented:
- Woven Ring (plantRing)
- Carved Ring (woodenRing)
For some reason my textures seem to be duplicated, as in the last loaded texture applies to both items ingame. If i go into my ModItems file and change the order in which items are loaded or comment out one of the two then the other one will load its texture fine.
ModItems file:
package com.fierychocobo.dryad.init;
import com.fierychocobo.dryad.Reference;
import com.fierychocobo.dryad.items.ItemDryadGem;
import com.fierychocobo.dryad.items.ItemPlantRing;
import com.fierychocobo.dryad.items.ItemWoodRing;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ModItems {
//public static Item dryadGem;
public static Item woodRing;
public static Item plantRing;
public static void init(){
// dryadGem = new ItemDryadGem();
plantRing = new ItemPlantRing();
woodRing = new ItemWoodRing();
}
public static void register(){
// GameRegistry.register(dryadGem);
GameRegistry.register(plantRing);
GameRegistry.register(woodRing);
}
public static void registerRenders(){
// registerRender(dryadGem);
registerRender(plantRing);
registerRender(woodRing);
}
private static void registerRender(Item item){
// Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(dryadGem, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(plantRing, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(woodRing, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
}
With this File both the Carved and Woven Ring get the Carved Ring Texture, however if i quote out the Carved Ring, then the Woven Ring has the correct Texture. (so i assume my .json Files are correct) I also do not get any Errors in the Console. I'll attach my Item Classes in a Spoiler, just in case: