提供: Minecraft Modding Wiki
(ページの作成:「==1.6のモデル付きカスタムツール追加== ===ソース=== *CustomModelTools.java <source lang = java> package custom.tool.item; import cpw.mods.fml.commo...」) |
|||
42行目: | 42行目: | ||
<source lang = java> | <source lang = java> | ||
package custom.tool.item; | package custom.tool.item; | ||
+ | |||
+ | import net.minecraft.block.Block; | ||
public class ItemCustomModelTools extends ItemTool | public class ItemCustomModelTools extends ItemTool | ||
{ | { | ||
− | public ItemCustomModelTools(int par1ID, | + | private static final Block[] setBleakingList = new Block[] {// ItemShovel |
+ | Block.grass, | ||
+ | Block.dirt, | ||
+ | Block.sand, | ||
+ | Block.gravel, | ||
+ | Block.snow, | ||
+ | Block.blockSnow, | ||
+ | Block.blockClay, | ||
+ | Block.tilledField, | ||
+ | Block.slowSand, | ||
+ | Block.mycelium | ||
+ | // ItemPickaxe | ||
+ | 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}; | ||
+ | |||
+ | public ItemCustomModelTools(int par1ID, EnumToolMaterial par2EnumToolMaterial) | ||
+ | { | ||
+ | super(par1ID, damageFloat, par2EnumToolMaterial, setBleakingList); | ||
+ | } | ||
} | } | ||
2014年1月5日 (日) 02:17時点における版
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[] {// ItemShovel Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium // ItemPickaxe 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}; public ItemCustomModelTools(int par1ID, EnumToolMaterial par2EnumToolMaterial) { super(par1ID, damageFloat, par2EnumToolMaterial, setBleakingList); } }
未完成