mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 11:32:20 +00:00
Added implementations for ScriptItemArmor, ScriptItemBlock, and ScriptItemBook, which all extend ScriptItemStack.
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user