Added implementations for ScriptItemArmor, ScriptItemBlock, and ScriptItemBook, which all extend ScriptItemStack.

This commit is contained in:
Luis C.M committed 2022-05-11 22:42:31 -05:00
1 parent cf33b90b26
commit b20babbb35
5 files changed
+97 -23

No files matched your search

@@ -1,19 +1,26 @@
package noppes.npcs.scripted.item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import noppes.npcs.scripted.interfaces.item.IItemArmor;
public class ScriptItemArmor extends ScriptItemStack implements IItemArmor {
protected ItemArmor armor;
public ScriptItemArmor(ItemStack item) {
super(item);
this.armor = (ItemArmor) item.getItem();
}
public int getType() {
return 3;
}
public int getArmorSlot() {
return 0;
return armor.armorType;
}
public String getArmorMaterial() {
return null;
return armor.getArmorMaterial().toString();
}
}