提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
85行目: | 85行目: | ||
{ | { | ||
//アイテムの登録 | //アイテムの登録 | ||
− | sampleItemWithMetadata= new ItemSample(sampleItemWithMetadataID | + | sampleItemWithMetadata = new ItemSample(sampleItemWithMetadataID).setCreativeTab(CreativeTabs.tabMaterials); |
GameRegistry.registerItem(sampleItemWithMetadata, "sampleItem"); | GameRegistry.registerItem(sampleItemWithMetadata, "sampleItem"); | ||
//ブロックの登録 | //ブロックの登録 | ||
− | blockSampleWithMetadata = new BlockSample(blockSampleWithMetadataID, Material.rock | + | blockSampleWithMetadata = new BlockSample(blockSampleWithMetadataID, Material.rock).setCreativeTab(CreativeTabs.tabBlock); |
//GameRegistry.registerBlock(blockSample, <ItemBlock>.class, "blockSample"); | //GameRegistry.registerBlock(blockSample, <ItemBlock>.class, "blockSample"); | ||
GameRegistry.registerBlock(blockSampleWithMetadata, ItemBlockSample.class, "blockSample"); | GameRegistry.registerBlock(blockSampleWithMetadata, ItemBlockSample.class, "blockSample"); | ||
107行目: | 107行目: | ||
import net.minecraft.item.ItemStack; | import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.Icon; | import net.minecraft.util.Icon; | ||
− | |||
− | |||
− | |||
import cpw.mods.fml.relauncher.Side; | import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | import cpw.mods.fml.relauncher.SideOnly; | ||
public class ItemSample extends Item { | public class ItemSample extends Item { | ||
− | |||
− | |||
− | |||
public ItemSample(int par1) { | public ItemSample(int par1) { | ||
127行目: | 121行目: | ||
@SideOnly(Side.CLIENT) | @SideOnly(Side.CLIENT) | ||
public Icon getIconFromDamage(int par1) { | public Icon getIconFromDamage(int par1) { | ||
− | return | + | return super.getIconFromDamage(par1); |
} | } | ||
150行目: | 144行目: | ||
par3List.add(new ItemStack(this, 1, 2)); | par3List.add(new ItemStack(this, 1, 2)); | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
194行目: | 175行目: | ||
} | } | ||
− | + | public int idDropped(int par1, Random par2Random, int par3) | |
− | public int | ||
{ | { | ||
return par1; | return par1; |