-
Notifications
You must be signed in to change notification settings - Fork 81
/
ItemNaturaImpArmor.java
47 lines (42 loc) · 1.39 KB
/
ItemNaturaImpArmor.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.progwml6.natura.tools.item.armor;
import com.progwml6.natura.tools.NaturaTools;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
public class ItemNaturaImpArmor extends ItemArmor
{
public ItemNaturaImpArmor(ArmorMaterial armorMaterialIn, EntityEquipmentSlot equipmentSlotIn)
{
super(armorMaterialIn, 1, equipmentSlotIn);
}
@Override
public void getSubItems(Item id, CreativeTabs tab, NonNullList<ItemStack> list)
{
switch (this.armorType)
{
case HEAD:
list.add(NaturaTools.impHelmetStack.copy());
break;
case CHEST:
list.add(NaturaTools.impChestplateStack.copy());
break;
case LEGS:
list.add(NaturaTools.impLeggingsStack.copy());
break;
case FEET:
list.add(NaturaTools.impBootsStack.copy());
break;
default:
break;
}
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type)
{
return "natura:textures/armor/imp_armor" + (slot == EntityEquipmentSlot.LEGS ? "_legs" : "") + ".png";
}
}