Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Renderer class:
- package com.Nitrodev.WarehouseStorage.client.render.items;
- import com.Nitrodev.WarehouseStorage.WarehouseStorage;
- import com.Nitrodev.WarehouseStorage.items.ModItems;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.resources.model.ModelResourceLocation;
- import net.minecraft.item.Item;
- /**
- * Created by Jukka on 22.12.2015.
- */
- public class ItemRenderRegister {
- public static String modid = WarehouseStorage.MODID;
- public static void registerItemRenderer() {
- reg(ModItems.itemPlank);
- }
- public static void reg(Item item) {
- Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
- .register(ModItems.itemPlank, 0, new ModelResourceLocation(modid + ":" + item.getUnlocalizedName().substring(5)));
- }
- }
- Model .json file:
- {
- "parent":"builtin/generated",
- "textures": {
- "layer0":"WarehouseStorage:items/item_plank.png"
- },
- "display": {
- "thirdperson": {
- "rotation": [ -90, 0, 0 ],
- "translation": [0, 1, -3 ],
- "scale": [ 0.55, 0.55, 0.55 ]
- },
- "firstperson": {
- "rotation": [ 0, -135, 25 ],
- "translation": [0, 4, 2 ],
- "scale": [ 1.7, 1.7, 1.7 ]
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement