Hello I hope, you can help me with the problem of rendering the model. The model itself is rendered, but here maps of textures/glare/normals/smooth/shading are not superimposed, and the .mtl file itself seems to be skipping. All paths and file names are named correctly. I do everything via json file in blockstates. What is the problem?
Attached screenshots, including the console.
I will be very grateful for help.
Version - 1.12.2
Item
public class LongSword extends ItemSword {
public LongSword(String name, ToolMaterial material) {
super(material);
setRegistryName(name);
setUnlocalizedName(name);
setCreativeTab(Main.LevWeapon);
}
}
Register
public class ItemsRegister {
public static ToolMaterial LongSwordMaterial = EnumHelper.addToolMaterial("LongSwordMaterial", 2, 256, 50.0F, 2.0F, 12);
public static ItemSword long_sword = new LongSword("long_sword", LongSwordMaterial);
public static void register() {
setRegister(long_sword);
}
@SideOnly(Side.CLIENT)
public static void registerRender() {
setRender(long_sword);
}
private static void setRegister(Item item) {
ForgeRegistries.ITEMS.register(item);
}
@SideOnly(Side.CLIENT)
private static void setRender(Item item) {
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
}
Proxy
public class ClientProxy extends CommonProxy {
public void registerModel(Item item) {
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
@Override
public void preInit(FMLPreInitializationEvent event) {
OBJLoader.INSTANCE.addDomain(Main.MODID);
registerModel(ItemsRegister.long_sword);
super.preInit(event);
}
@Override
public void init(FMLInitializationEvent event) {
ItemsRegister.registerRender();
super.init(event);
}
@Override
public void postInit(FMLPostInitializationEvent event) {
super.postInit(event);
}
}
Hello I hope, you can help me with the problem of rendering the model. The model itself is rendered, but here maps of textures/glare/normals/smooth/shading are not superimposed, and the .mtl file itself seems to be skipping. All paths and file names are named correctly. I do everything via json file in blockstates. What is the problem?
Attached screenshots, including the console.
I will be very grateful for help.
Version - 1.12.2
Item
Register
Proxy
blockstates .json file
.mtl file