提供: Minecraft Modding Wiki
2014年1月5日 (日) 02:24時点におけるRedolyr (トーク | 投稿記録)による版
移動先: 案内検索

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

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

ソース

  • CustomModelTools.java
package custom.tool.item;

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.event.FMLPreInitializationEvent;

@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 serverSudeRequiredBoolean = false;
    
    public static ItemTool mainItem;
    
    @EventHabdler
    public void mainLoading(FMLPreInitializationEvent event)
    {
        mainItem = new
    }
}
  • ItemCustomModelTools.java
package custom.tool.item;

import net.minecraft.block.Block;

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};
                                                                // Infomation is Brows ItemAxe.java / ItemSpade.java / ItemPickaxe.java
    
    public ItemCustomModelTools(int par1ID, EnumToolMaterial par2EnumToolMaterial)
    {
        super(par1ID, damageFloat, par2EnumToolMaterial, setBleakingList);
    }
}

未完成