提供: Minecraft Modding Wiki
移動先: 案内検索
11行目: 11行目:
  
 
import net.minecraft.item.EnumToolMaterial;
 
import net.minecraft.item.EnumToolMaterial;
import net.minecraftforge.MinecraftForgeClient;
+
import net.minecraft.item.Item;
 +
import net.minecraft.item.ItemTool;
 +
import net.minecraftforge.client.IItemRenderer;
 +
import net.minecraftforge.client.MinecraftForgeClient;
 
import cpw.mods.fml.common.Mod;
 
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.network.NetworkMod;
 
 
import cpw.mods.fml.common.Mod.EventHandler;
 
import cpw.mods.fml.common.Mod.EventHandler;
 
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
 
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
+
import cpw.mods.fml.common.network.NetworkMod;
 
import cpw.mods.fml.common.registry.LanguageRegistry;
 
import cpw.mods.fml.common.registry.LanguageRegistry;
  
31行目: 33行目:
 
{
 
{
 
     public static final boolean clientSideRequiredBoolean = true;
 
     public static final boolean clientSideRequiredBoolean = true;
     public static final boolean serverSudeRequiredBoolean = false;
+
     public static final boolean serverSideRequiredBoolean = false;
 
      
 
      
 
     public static boolean Model_ON_OFF_Boolean = true;
 
     public static boolean Model_ON_OFF_Boolean = true;
41行目: 43行目:
 
     public static ItemTool mainItem;
 
     public static ItemTool mainItem;
 
      
 
      
     @EventHabdler
+
     @EventHandler
 
     public void mainLoading(FMLPreInitializationEvent event)
 
     public void mainLoading(FMLPreInitializationEvent event)
 
     {
 
     {
         mainItem = new ItemCustomModelTools(3001, toolMaterial.rock).setData("CustomModelItem", "CustomModelItem");
+
         mainItem = (ItemTool) new ItemCustomModelTools(3001, toolMaterial.IRON).setData("CustomModelItem", "CustomModelItem", 1.0F);
         registerItem(mainItem, "CustomModelItem", "Custom Model Item", "カスタムモデルアイテム", new ItemCustomModelToolsRenderer(), texture, 64, 32);
+
         registerItem(mainItem, "CustomModelItem", "Custom Model Item", "カスタムモデルアイテム", new ItemCustomModelToolsRenderer(), true, texture, 64, 32);
 
     }
 
     }
 
     public void registerItem(Item items, String name, String en_US, String ja_JP, IItemRenderer itemRenderer, boolean modeling, String texture, int width, int height)
 
     public void registerItem(Item items, String name, String en_US, String ja_JP, IItemRenderer itemRenderer, boolean modeling, String texture, int width, int height)
 
     {
 
     {
         GameReigstry.registerItem(items, name);
+
         GameRegistry.registerItem(items, name);
         LanguageRegistry.addNameForObject(items, "en_US", en_US);
+
         LanguageRegistry.instance().addNameForObject(items, "en_US", en_US);
         LanguageRegistry.addNameForObject(items, "ja_JP", ja_JP);
+
         LanguageRegistry.instance().addNameForObject(items, "ja_JP", ja_JP);
 
         MinecraftForgeClient.registerItemRenderer(items.itemID, itemRenderer);
 
         MinecraftForgeClient.registerItemRenderer(items.itemID, itemRenderer);
 
         Model_ON_OFF_Boolean = modeling;
 
         Model_ON_OFF_Boolean = modeling;
 
         ModelTexture = texture;
 
         ModelTexture = texture;
         ModelCustomModelTools modeling = new ModelCustomModelTools();
+
         ModelCustomModelTools modelings = new ModelCustomModelTools();
         modeling.setTextureSize(width, height);
+
         modelings.setTextureSize(width, height);
 
     }
 
     }
 
}
 
}
66行目: 68行目:
 
<source lang = java>
 
<source lang = java>
 
package custom.tool.item;
 
package custom.tool.item;
 
+
import net.minecraft.item.Item;
 
import net.minecraft.item.ItemTool;
 
import net.minecraft.item.ItemTool;
 +
import net.minecraft.item.ItemStack;
 
import net.minecraft.item.EnumToolMaterial;
 
import net.minecraft.item.EnumToolMaterial;
 
import net.minecraft.block.Block;
 
import net.minecraft.block.Block;
import net.minecraft.block.Material;
+
import net.minecraft.block.material.Material;
  
 
public class ItemCustomModelTools extends ItemTool
 
public class ItemCustomModelTools extends ItemTool
85行目: 88行目:
 
                                                                 Block.tilledField,
 
                                                                 Block.tilledField,
 
                                                                 Block.slowSand,
 
                                                                 Block.slowSand,
                                                                 Block.mycelium
+
                                                                 Block.mycelium,
 
                                                                 // ItemPickaxe.java
 
                                                                 // ItemPickaxe.java
 
                                                                 Block.cobblestone,
 
                                                                 Block.cobblestone,
107行目: 110行目:
 
                                                                 Block.railDetector,
 
                                                                 Block.railDetector,
 
                                                                 Block.railPowered,
 
                                                                 Block.railPowered,
                                                                 Block.railActivator
+
                                                                 Block.railActivator,
                                // ItemAxe.java
+
                                                                // ItemAxe.java
                                                                 Block.planks, Block.bookShelf,
+
                                                                 Block.planks,
 +
                                                                Block.bookShelf,
 
                                                                 Block.wood, Block.chest,
 
                                                                 Block.wood, Block.chest,
 
                                                                 Block.stoneDoubleSlab,
 
                                                                 Block.stoneDoubleSlab,
116行目: 120行目:
 
                                                                 Block.pumpkinLantern};
 
                                                                 Block.pumpkinLantern};
 
                                                                 // 詳しい情報は、ItemSpade.java ItemPickaxe.java ItemAxe.javaを参照
 
                                                                 // 詳しい情報は、ItemSpade.java ItemPickaxe.java ItemAxe.javaを参照
      
+
     public static float damageFloat = 1.0F;
 +
 
     public ItemCustomModelTools(int par1ID, EnumToolMaterial par2EnumToolMaterial)
 
     public ItemCustomModelTools(int par1ID, EnumToolMaterial par2EnumToolMaterial)
 
     {
 
     {
124行目: 129行目:
 
     public boolean canHarvestBlock(Block par1Block)
 
     public boolean canHarvestBlock(Block par1Block)
 
     {
 
     {
        return par1Block == Block.snow ? true : par1Block == Block.blockSnow : //雪
+
    return setBleakingList != null;
              (par1Block == Block.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : //黒曜石
 
              (par1Block != Block.blockDiamond && par1Block != Block.oreDiamond ? //ダイヤモンド
 
              (par1Block != Block.oreEmerald && par1Block != Block.blockEmerald ? //エメラルド
 
              (par1Block != Block.blockGold && par1Block != Block.oreGold ? //金
 
              (par1Block != Block.blockIron && par1Block != Block.oreIron ? //鉄
 
              (par1Block != Block.blockLapis && par1Block != Block.oreLapis ? //ラピスラズリ
 
              (par1Block != Block.oreRedstone && par1Block != Block.oreRedstoneGlowing ? //レッドストーン
 
              (par1Block.blockMaterial == Material.rock ? true : //マテリアル属性 石
 
              (par1Block.blockMaterial == Material.iron ? true : //マテリアル属性 鉄
 
                par1Block.blockMaterial == Material.anvil)) //マテリアル属性 金床
 
                this.toolMaterial.getHarvestLevel() >= 2) : //マテリアルレベル 2
 
                this.toolMaterial.getHarvestLevel() >= 1) : //マテリアルレベル 1
 
                this.toolMaterial.getHarvestLevel() >= 1) : //マテリアルレベル 1
 
                this.toolMaterial.getHarvestLevel() >= 2) : //マテリアルレベル 2
 
                this.toolMaterial.getHarvestLevel() >= 2) : //マテリアルレベル 2
 
                this.toolMaterial.getHarvestLevel() >= 2)); //マテリアルレベル 2
 
 
     }
 
     }
 
     @Override
 
     @Override
155行目: 144行目:
 
                 super.getStrVsBlock(par1ItemStack, par2Block);
 
                 super.getStrVsBlock(par1ItemStack, par2Block);
 
     }
 
     }
     public Item setData(String domain, String path)
+
     public Item setData(String domain, String path, float damage)
 
     {
 
     {
 
         setUnlocalizedName(path);
 
         setUnlocalizedName(path);
 
         iconString = domain + ":" + path;
 
         iconString = domain + ":" + path;
 +
        damageFloat = damage;
 +
        return this;
 
     }
 
     }
 
}
 
}
168行目: 159行目:
 
<source lang = java>
 
<source lang = java>
 
package custom.tool.item;
 
package custom.tool.item;
 
+
import net.minecraftforge.client.IItemRenderer;
 
 
import net.minecraft.client.Minecraft;
 
import net.minecraft.client.Minecraft;
 +
import net.minecraft.entity.Entity;
 +
import net.minecraft.item.ItemStack;
 
import net.minecraft.util.ResourceLocation;
 
import net.minecraft.util.ResourceLocation;
 +
import net.minecraftforge.client.IItemRenderer;
 +
 
import org.lwjgl.opengl.GL11;
 
import org.lwjgl.opengl.GL11;
 
+
 
public class ItemCustomModelToolsRenderer implements IItemRenderer
 
public class ItemCustomModelToolsRenderer implements IItemRenderer
 
{
 
{
206行目: 200行目:
 
             {
 
             {
 
                 GL11.glPushMatrix();
 
                 GL11.glPushMatrix();
               
+
 
                 float scala = 2.5F;
 
                 float scala = 2.5F;
               
+
                 GL11.glScalaf(scala, scala, scala);
+
                 GL11.glScalef(scala, scala, scala);
               
+
 
                 GL11.glRotatef(0F, -10.0F, 0.0F, 0.0F);
 
                 GL11.glRotatef(0F, -10.0F, 0.0F, 0.0F);
 
                 GL11.glRotatef(8F, 0.0F, -10.0F, 0.0F);
 
                 GL11.glRotatef(8F, 0.0F, -10.0F, 0.0F);
 
                 GL11.glRotatef(125F, 0.0F, 0.0F, -10.0F);
 
                 GL11.glRotatef(125F, 0.0F, 0.0F, -10.0F);
               
+
 
                 GL11.glTranslatef(-0.304800F, -0.500F, -0.09F);
 
                 GL11.glTranslatef(-0.304800F, -0.500F, -0.09F);
               
+
 
                 mc.renderEngine.bindTexture(new ResourceLocation(CustomModelTools.ModelTexture));
 
                 mc.renderEngine.bindTexture(new ResourceLocation(CustomModelTools.ModelTexture));
               
+
 
                 modeling.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
 
                 modeling.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
               
+
 
                 GL11.glPopMatrix();
 
                 GL11.glPopMatrix();
 
             }
 
             }
235行目: 229行目:
 
<source lang = java>
 
<source lang = java>
 
package custom.tool.item;
 
package custom.tool.item;
 
+
import net.minecraft,client.model.ModelBase;
+
import net.minecraft.client.model.ModelBase;
 
import net.minecraft.client.model.ModelRenderer;
 
import net.minecraft.client.model.ModelRenderer;
 
import net.minecraft.entity.Entity;
 
import net.minecraft.entity.Entity;
 
+
 
public class ModelCustomModelTools extends ModelBase
 
public class ModelCustomModelTools extends ModelBase
 
{
 
{
253行目: 247行目:
 
     public ModelRenderer AxeDown;
 
     public ModelRenderer AxeDown;
 
     public ModelRenderer Forward;
 
     public ModelRenderer Forward;
   
+
 
     public int TextureSizeWidth = 64;
 
     public int TextureSizeWidth = 64;
 
     public int TextureSizeHeight = 32;
 
     public int TextureSizeHeight = 32;
296行目: 290行目:
 
         MainCenter.mirror = true;
 
         MainCenter.mirror = true;
 
         setRotation(MainCenter, 0F, 0F, 0F);
 
         setRotation(MainCenter, 0F, 0F, 0F);
AxeUp = new ModelRenderer(this, 30, 14);
+
        AxeUp = new ModelRenderer(this, 30, 14);
AxeUp.addBox(0F, 0F, 0F, 2, 6, 4);
+
        AxeUp.addBox(0F, 0F, 0F, 2, 6, 4);
AxeUp.setRotationPoint(-4F, -9F, -2F);
+
        AxeUp.setRotationPoint(-4F, -9F, -2F);
AxeUp.setTextureSize(TextureSizeWidth, TextureSizeHeight);
+
        AxeUp.setTextureSize(TextureSizeWidth, TextureSizeHeight);
AxeUp.mirror = true;
+
        AxeUp.mirror = true;
setRotation(AxeUp, 0F, 0F, 0.7853982F);
+
        setRotation(AxeUp, 0F, 0F, 0.7853982F);
AxeLeft = new ModelRenderer(this, 30, 2);
+
        AxeLeft = new ModelRenderer(this, 30, 2);
AxeLeft.addBox(0F, 0F, 0F, 2, 6, 6);
+
        AxeLeft.addBox(0F, 0F, 0F, 2, 6, 6);
AxeLeft.setRotationPoint(-3F, -5F, -5F);
+
        AxeLeft.setRotationPoint(-3F, -5F, -5F);
AxeLeft.setTextureSize(TextureSizeWidth, TextureSizeHeight);
+
        AxeLeft.setTextureSize(TextureSizeWidth, TextureSizeHeight);
AxeLeft.mirror = true;
+
        AxeLeft.mirror = true;
setRotation(AxeLeft, 0F, -1.047198F, 0F);
+
        setRotation(AxeLeft, 0F, -1.047198F, 0F);
AxeRight = new ModelRenderer(this, 30, 2);
+
        AxeRight = new ModelRenderer(this, 30, 2);
AxeRight.addBox(0F, 0F, 0F, 2, 6, 6);
+
        AxeRight.addBox(0F, 0F, 0F, 2, 6, 6);
AxeRight.setRotationPoint(-8F, -5F, 2F);
+
        AxeRight.setRotationPoint(-8F, -5F, 2F);
AxeRight.setTextureSize(TextureSizeWidth, TextureSizeHeight);
+
        AxeRight.setTextureSize(TextureSizeWidth, TextureSizeHeight);
AxeRight.mirror = true;
+
        AxeRight.mirror = true;
setRotation(AxeRight, 0F, 1.047198F, 0F);
+
        setRotation(AxeRight, 0F, 1.047198F, 0F);
AxeDown = new ModelRenderer(this, 30, 14);
+
        AxeDown = new ModelRenderer(this, 30, 14);
AxeDown.addBox(0F, 0F, 0F, 2, 6, 4);
+
        AxeDown.addBox(0F, 0F, 0F, 2, 6, 4);
AxeDown.setRotationPoint(-8F, 1F, -2F);
+
        AxeDown.setRotationPoint(-8F, 1F, -2F);
AxeDown.setTextureSize(TextureSizeWidth, TextureSizeHeight);
+
        AxeDown.setTextureSize(TextureSizeWidth, TextureSizeHeight);
AxeDown.mirror = true;
+
        AxeDown.mirror = true;
setRotation(AxeDown, 0F, 0F, -0.7853982F);
+
        setRotation(AxeDown, 0F, 0F, -0.7853982F);
Forward = new ModelRenderer(this, 8, 6);
+
        Forward = new ModelRenderer(this, 8, 6);
Forward.addBox(0F, 0F, 0F, 1, 4, 2);
+
        Forward.addBox(0F, 0F, 0F, 1, 4, 2);
Forward.setRotationPoint(-8.5F, -4F, -1F);
+
        Forward.setRotationPoint(-8.5F, -4F, -1F);
Forward.setTextureSize(TextureSizeWidth, TextureSizeHeight);
+
        Forward.setTextureSize(TextureSizeWidth, TextureSizeHeight);
Forward.mirror = true;
+
        Forward.mirror = true;
    setRotation(Forward, 0F, 0F, 0F);
+
        setRotation(Forward, 0F, 0F, 0F);
 
     }
 
     }
 
     public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
 
     public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
349行目: 343行目:
 
         model.rotateAngleZ = z;
 
         model.rotateAngleZ = z;
 
     }
 
     }
     public void setRotationAngles(float f, float f1, float, f2, float f3, float f4, float f5, Entity entity)
+
     public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
 
     {
 
     {
 
         super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
 
         super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
355行目: 349行目:
 
     public void setTextureSize(int width, int height)
 
     public void setTextureSize(int width, int height)
 
     {
 
     {
         TextureSizeWidth = width
+
         TextureSizeWidth = width;
         TextureSizeHeight = height
+
         TextureSizeHeight = height;
 
     }
 
     }
 
}
 
}
 +
 
</source>
 
</source>
  
 
未完成<br>
 
未完成<br>
 
[[チュートリアル一覧]]に乗せる方がいるのなら、まだ乗せないで下さい
 
[[チュートリアル一覧]]に乗せる方がいるのなら、まだ乗せないで下さい

2014年1月5日 (日) 16:39時点における版

1.6のモデル付きカスタムツール追加

このアイテムは、(つるはし)(ショベル)(斧)の三つ(鉄製)にモデルを付けて追加するものです。

ソース

  • CustomModelTools.java
package custom.tool.item;

import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemTool;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(
    modid = "CustomModelTools",
    name = "Custom Model Tools",
    version = "1"
)
@NetworkMod(
    clientSideRequired = CustomModelTools.clientSideRequiredBoolean,
    serverSideRequired = CustomModelTools.serverSideRequiredBoolean
)
public class CustomModelTools
{
    public static final boolean clientSideRequiredBoolean = true;
    public static final boolean serverSideRequiredBoolean = false;
    
    public static boolean Model_ON_OFF_Boolean = true;
    public static String ModelTexture;
    public static String texture;
    
    public static EnumToolMaterial toolMaterial;
    
    public static ItemTool mainItem;
    
    @EventHandler
    public void mainLoading(FMLPreInitializationEvent event)
    {
        mainItem = (ItemTool) new ItemCustomModelTools(3001, toolMaterial.IRON).setData("CustomModelItem", "CustomModelItem", 1.0F);
        registerItem(mainItem, "CustomModelItem", "Custom Model Item", "カスタムモデルアイテム", new ItemCustomModelToolsRenderer(), true, texture, 64, 32);
    }
    public void registerItem(Item items, String name, String en_US, String ja_JP, IItemRenderer itemRenderer, boolean modeling, String texture, int width, int height)
    {
        GameRegistry.registerItem(items, name);
        LanguageRegistry.instance().addNameForObject(items, "en_US", en_US);
        LanguageRegistry.instance().addNameForObject(items, "ja_JP", ja_JP);
        MinecraftForgeClient.registerItemRenderer(items.itemID, itemRenderer);
        Model_ON_OFF_Boolean = modeling;
        ModelTexture = texture;
        ModelCustomModelTools modelings = new ModelCustomModelTools();
        modelings.setTextureSize(width, height);
    }
}
  • ItemCustomModelTools.java
package custom.tool.item;
import net.minecraft.item.Item;
import net.minecraft.item.ItemTool;
import net.minecraft.item.ItemStack;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;

public class ItemCustomModelTools extends ItemTool
{
    //壊せるブロックのリスト
    private static final Block[] setBleakingList = new Block[] {// ItemSpade.java
                                                                Block.grass,
                                                                Block.dirt,
                                                                Block.sand,
                                                                Block.gravel,
                                                                Block.snow,
                                                                Block.blockSnow,
                                                                Block.blockClay,
                                                                Block.tilledField,
                                                                Block.slowSand,
                                                                Block.mycelium,
                                                                // ItemPickaxe.java
                                                                Block.cobblestone,
                                                                Block.stoneDoubleSlab,
                                                                Block.stoneSingleSlab,
                                                                Block.stone, Block.sandStone,
                                                                Block.cobblestoneMossy,
                                                                Block.oreIron,
                                                                Block.blockIron,
                                                                Block.oreCoal,
                                                                Block.blockGold,
                                                                Block.oreGold,
                                                                Block.oreDiamond,
                                                                Block.blockDiamond,
                                                                Block.ice,
                                                                Block.netherrack,
                                                                Block.oreLapis, Block.blockLapis,
                                                                Block.oreRedstone,
                                                                Block.oreRedstoneGlowing,
                                                                Block.rail,
                                                                Block.railDetector,
                                                                Block.railPowered,
                                                                Block.railActivator,
                                                                // ItemAxe.java
                                                                Block.planks,
                                                                Block.bookShelf,
                                                                Block.wood, Block.chest,
                                                                Block.stoneDoubleSlab,
                                                                Block.stoneSingleSlab,
                                                                Block.pumpkin,
                                                                Block.pumpkinLantern};
                                                                // 詳しい情報は、ItemSpade.java ItemPickaxe.java ItemAxe.javaを参照
    public static float damageFloat = 1.0F;
 
    public ItemCustomModelTools(int par1ID, EnumToolMaterial par2EnumToolMaterial)
    {
        super(par1ID, damageFloat, par2EnumToolMaterial, setBleakingList);
    }
    @Override
    public boolean canHarvestBlock(Block par1Block)
    {
    	return setBleakingList != null;
    }
    @Override
    public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
    {
        return par2Block != null &&
               (par2Block.blockMaterial == Material.iron || //マテリアル属性 鉄
                par2Block.blockMaterial == Material.anvil || //マテリアル属性 金床
                par2Block.blockMaterial == Material.rock || //マテリアル属性 石
                par2Block.blockMaterial == Material.wood || //マテリアル属性 原木
                par2Block.blockMaterial == Material.plants || //マテリアル属性 木の厚板
                par2Block.blockMaterial == Material.vine) ? //マテリアル属性 つる
                this.efficiencyOnProperMaterial :
                super.getStrVsBlock(par1ItemStack, par2Block);
    }
    public Item setData(String domain, String path, float damage)
    {
        setUnlocalizedName(path);
        iconString = domain + ":" + path;
        damageFloat = damage;
        return this;
    }
}
  • ItemCustomModelToolsRenderer.java
package custom.tool.item;
 
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer;

import org.lwjgl.opengl.GL11;
 
public class ItemCustomModelToolsRenderer implements IItemRenderer
{
    private ModelCustomModelTools modeling;
    protected Minecraft mc;
    public ItemCustomModelToolsRenderer()
    {
        modeling = new ModelCustomModelTools();
    }
    @Override
    public boolean handleRenderType(ItemStack item, ItemRenderType type)
    {
        switch(type)
        {
            case EQUIPPED :
                return CustomModelTools.Model_ON_OFF_Boolean;
            default:
                return false;
        }
    }
    @Override
    public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
    {
        return false;
    }
    @Override
    public void renderItem(ItemRenderType type, ItemStack item, Object... data)
    {
        switch(type)
        {
            case EQUIPPED :
            {
                GL11.glPushMatrix();
 
                float scala = 2.5F;
 
                GL11.glScalef(scala, scala, scala);
 
                GL11.glRotatef(0F, -10.0F, 0.0F, 0.0F);
                GL11.glRotatef(8F, 0.0F, -10.0F, 0.0F);
                GL11.glRotatef(125F, 0.0F, 0.0F, -10.0F);
 
                GL11.glTranslatef(-0.304800F, -0.500F, -0.09F);
 
                mc.renderEngine.bindTexture(new ResourceLocation(CustomModelTools.ModelTexture));
 
                modeling.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
 
                GL11.glPopMatrix();
            }
            default:
                break;
         }
    }
}
  • ModelCustomModelTools
package custom.tool.item;
 
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
 
public class ModelCustomModelTools extends ModelBase
{
    public ModelRenderer Stick;
    public ModelRenderer EnderEye;
    public ModelRenderer PickaxePats1;
    public ModelRenderer PickaxePats2;
    public ModelRenderer PickaxePats3;
    public ModelRenderer MainCenter;
    public ModelRenderer AxeUp;
    public ModelRenderer AxeLeft;
    public ModelRenderer AxeRight;
    public ModelRenderer AxeDown;
    public ModelRenderer Forward;
 
    public int TextureSizeWidth = 64;
    public int TextureSizeHeight = 32;
    public ModelCustomModelTools()
    {
        textureWidth = TextureSizeWidth ;
        textureHeight = TextureSizeHeight ;
        Stick = new ModelRenderer(this, 0, 0);
        Stick.addBox(0F, 0F, 0F, 2, 14, 2);
        Stick.setRotationPoint(-1F, 0F, -1F);
        Stick.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        Stick.mirror = true;
        setRotation(Stick, 0F, 0F, 0F);
        EnderEye = new ModelRenderer(this, 8, 0);
        EnderEye.addBox(0F, 0F, 0F, 3, 3, 3);
        EnderEye.setRotationPoint(-1.5F, 13.5F, -1.5F);
        EnderEye.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        EnderEye.mirror = true;
        setRotation(EnderEye, 0F, 0F, 0F);
        PickaxePats1 = new ModelRenderer(this, 20, 0);
        PickaxePats1.addBox(0F, 0F, 0F, 10, 2, 2);
        PickaxePats1.setRotationPoint(-4F, -2F, -1F);
        PickaxePats1.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        PickaxePats1.mirror = true;
        setRotation(PickaxePats1, 0F, 0F, 0F);
        PickaxePats2 = new ModelRenderer(this, 44, 0);
        PickaxePats2.addBox(0F, 0F, 0F, 5, 2, 2);
        PickaxePats2.setRotationPoint(6F, -2F, -1F);
        PickaxePats2.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        PickaxePats2.mirror = true;
        setRotation(PickaxePats2, 0F, 0F, 0.2617994F);
        PickaxePats3 = new ModelRenderer(this, 20, 4);
        PickaxePats3.addBox(0F, 0F, 0F, 3, 1, 2);
        PickaxePats3.setRotationPoint(10F, 0F, -1F);
        PickaxePats3.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        PickaxePats3.mirror = true;
        setRotation(PickaxePats3, 0F, 0F, 0.4363323F);
        MainCenter = new ModelRenderer(this, 30, 4);
        MainCenter.addBox(0F, 0F, 0F, 4, 6, 4);
        MainCenter.setRotationPoint(-8F, -5F, -2F);
        MainCenter.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        MainCenter.mirror = true;
        setRotation(MainCenter, 0F, 0F, 0F);
        AxeUp = new ModelRenderer(this, 30, 14);
        AxeUp.addBox(0F, 0F, 0F, 2, 6, 4);
        AxeUp.setRotationPoint(-4F, -9F, -2F);
        AxeUp.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        AxeUp.mirror = true;
        setRotation(AxeUp, 0F, 0F, 0.7853982F);
        AxeLeft = new ModelRenderer(this, 30, 2);
        AxeLeft.addBox(0F, 0F, 0F, 2, 6, 6);
        AxeLeft.setRotationPoint(-3F, -5F, -5F);
        AxeLeft.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        AxeLeft.mirror = true;
        setRotation(AxeLeft, 0F, -1.047198F, 0F);
        AxeRight = new ModelRenderer(this, 30, 2);
        AxeRight.addBox(0F, 0F, 0F, 2, 6, 6);
        AxeRight.setRotationPoint(-8F, -5F, 2F);
        AxeRight.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        AxeRight.mirror = true;
        setRotation(AxeRight, 0F, 1.047198F, 0F);
        AxeDown = new ModelRenderer(this, 30, 14);
        AxeDown.addBox(0F, 0F, 0F, 2, 6, 4);
        AxeDown.setRotationPoint(-8F, 1F, -2F);
        AxeDown.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        AxeDown.mirror = true;
        setRotation(AxeDown, 0F, 0F, -0.7853982F);
        Forward = new ModelRenderer(this, 8, 6);
        Forward.addBox(0F, 0F, 0F, 1, 4, 2);
        Forward.setRotationPoint(-8.5F, -4F, -1F);
        Forward.setTextureSize(TextureSizeWidth, TextureSizeHeight);
        Forward.mirror = true;
        setRotation(Forward, 0F, 0F, 0F);
    }
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
    {
        super.render(entity, f, f1, f2, f3, f4, f5);
        setRotationAngles(f, f1, f2, f3, f4, f5, entity);
        Stick.render(f5);
        EnderEye.render(f5);
        PickaxePats1.render(f5);
        PickaxePats2.render(f5);
        PickaxePats3.render(f5);
        MainCenter.render(f5);
        AxeUp.render(f5);
        AxeLeft.render(f5);
        AxeRight.render(f5);
        AxeDown.render(f5);
        Forward.render(f5);
    }
    private void setRotation(ModelRenderer model, float x, float y, float z)
    {
        model.rotateAngleX = x;
        model.rotateAngleY = y;
        model.rotateAngleZ = z;
    }
    public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
    {
        super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    }
    public void setTextureSize(int width, int height)
    {
        TextureSizeWidth = width;
        TextureSizeHeight = height;
    }
}

未完成
チュートリアル一覧に乗せる方がいるのなら、まだ乗せないで下さい