Вместо модели еррор блок с текстом

Версия Minecraft
1.12.2
API
Forge
1640193615103.png
ItemsRegistry
package ru.craft.lazy_mod;

import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@GameRegistry.ObjectHolder("lazy_mod")
@Mod.EventBusSubscriber
public class ItemsRegistry {
@GameRegistry.ObjectHolder("gear")
public static final Item GEAR = null;


@SubscribeEvent
public static void onRegistryItem(RegistryEvent.Register<Item> e) {

e.getRegistry().register(new ItemGear());

}


@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRegistryModel(ModelRegistryEvent e) {
registryModel(GEAR);
}
@SideOnly(Side.CLIENT)
private static void registryModel(Item item) {
final ResourceLocation regName = item.getRegistryName();
final ModelResourceLocation mrl = new ModelResourceLocation(regName, "inventory");
ModelBakery.registerItemVariants(item, mrl);
ModelLoader.setCustomModelResourceLocation(item, 0, mrl);
}

}
ItemGear
package ru.craft.lazy_mod;

import net.minecraft.item.Item;

public class ItemGear extends Item {
public ItemGear() {
this.setRegistryName("gear");
this.setUnlocalizedName("gear");
}
}
 
Файл json
{
"__comment": "Model generated using MrCrayfish's Model Creator (MrCrayfish's Model Creator)",
"textures": {
"layer0": "lazy_mod:items/gear"
},
"display": {
"gui": {
"rotation": [ 30, 45, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 0.625, 0.625, 0.625 ]
},
"ground": {
"rotation": [ 0, 0, 0 ],
"translation": [ 0, 3, 0 ],
"scale": [ 0.25, 0.25, 0.25 ]
},
"fixed": {
"rotation": [ 0, 180, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 1, 1, 1 ]
},
"head": {
"rotation": [ 0, 180, 0 ],
"translation": [ 0, 0, 0 ],
"scale": [ 1, 1, 1 ]
},
"firstperson_righthand": {
"rotation": [ 0, 315, 0 ],
"translation": [ 0, 2.5, 0 ],
"scale": [ 0.4, 0.4, 0.4 ]
},
"thirdperson_righthand": {
"rotation": [ 75, 315, 0 ],
"translation": [ 0, 2.5, 0 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
},
"elements": [
{
"name": "Cube",
"from": [ 7, 7, 3 ],
"to": [ 9, 8, 7 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 4 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 7, 7, 9 ],
"to": [ 9, 8, 13 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 4 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 9, 7, 7 ],
"to": [ 13, 8, 9 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 4, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 3, 7, 7 ],
"to": [ 7, 8, 9 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 4, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 4, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 5, 7, 9 ],
"to": [ 7, 8, 11 ],
"faces": {
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 9, 7, 9 ],
"to": [ 11, 8, 11 ],
"faces": {
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 9, 7, 5 ],
"to": [ 11, 8, 7 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 5, 7, 5 ],
"to": [ 7, 8, 7 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 4, 7, 4 ],
"to": [ 6, 8, 6 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 10, 7, 4 ],
"to": [ 12, 8, 6 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 10, 7, 10 ],
"to": [ 12, 8, 12 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
},
{
"name": "Cube",
"from": [ 4, 7, 10 ],
"to": [ 6, 8, 12 ],
"faces": {
"north": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"east": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"south": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"west": { "texture": "#gear", "uv": [ 0, 0, 2, 1 ] },
"up": { "texture": "#gear", "uv": [ 0, 0, 2, 2 ] },
"down": { "texture": "#gear", "uv": [ 0, 0, 0, 1 ] }
}
}
]
}
 
 
Покажи лог запуска
 
Назад
Сверху