提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
{{前提MOD|reqmod="Minecraft Forge Universal 10.12.0.xxx~"}} | {{前提MOD|reqmod="Minecraft Forge Universal 10.12.0.xxx~"}} | ||
+ | |||
{{チュートリアル難易度|difficulty=0|clear=none}} | {{チュートリアル難易度|difficulty=0|clear=none}} | ||
+ | |||
{{チュートリアルカテゴリー|difficulty=0|type=Item}} | {{チュートリアルカテゴリー|difficulty=0|type=Item}} | ||
33行目: | 35行目: | ||
public class SampleItemArmor extends ItemArmor { | public class SampleItemArmor extends ItemArmor { | ||
− | public static final String HELMET_TEXTURE = " | + | public static final String HELMET_TEXTURE = "(domain名):textures/armor/helmet.png";//armorフォルダである必要はない。 |
− | public static final String CHESTPLATE_TEXTURE = " | + | public static final String CHESTPLATE_TEXTURE = "(domain名):textures/armor/plate.png"; |
− | public static final String LEGGINGS_TEXTURE = " | + | public static final String LEGGINGS_TEXTURE = "(domain名):textures/armor/leg.png"; |
− | public static final String BOOTS_TEXTURE = " | + | public static final String BOOTS_TEXTURE = "(domain名):textures/armor/boots.png"; |
//renderIndexは以下でArmorTextureを指定する場合はどんな値でも良い。 | //renderIndexは以下でArmorTextureを指定する場合はどんな値でも良い。 | ||
//0 is cloth, 1 is chain, 2 is iron, 3 is diamond and 4 is gold. | //0 is cloth, 1 is chain, 2 is iron, 3 is diamond and 4 is gold. | ||
67行目: | 69行目: | ||
} | } | ||
</source> | </source> | ||
− | |||
===解説=== | ===解説=== | ||
基本的に[[1.7のアイテム追加]]と同じ要領で追加できる。 | 基本的に[[1.7のアイテム追加]]と同じ要領で追加できる。 | ||
75行目: | 76行目: | ||
メソッド内の処理は、スロット別にテクスチャ文字列を変えている。スロットが逆順なので、4-slotで判定している。 | メソッド内の処理は、スロット別にテクスチャ文字列を変えている。スロットが逆順なので、4-slotで判定している。 | ||
この判定は緩いので、場合によって適宜判定を追加したほうが良い。 | この判定は緩いので、場合によって適宜判定を追加したほうが良い。 | ||
− | |||
− | |||
− | |||
− | |||
− |