mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 05:19:41 +00:00
added attack speed parameter to linked Items
This commit is contained in:
1 parent
c3651fd6f7
commit
0b2bf5fd04
3 files changed
+37
-1
No files matched your search
@@ -29,6 +29,7 @@ public class LinkedItem implements ILinkedItem {
|
||||
public boolean isNormalItem = false;
|
||||
public boolean isTool = false;
|
||||
public int digSpeed = 1;
|
||||
public int attackSpeed = 20;
|
||||
public int armorType = -2; //-2: Fits in no armor slot, -1: Fits in all slots, 0 - 3: Fits in Head -> Boots slot respectively
|
||||
public int enchantability;
|
||||
|
||||
@@ -58,6 +59,7 @@ public class LinkedItem implements ILinkedItem {
|
||||
compound.setBoolean("IsTool", this.isTool);
|
||||
compound.setBoolean("IsNormalItem", this.isNormalItem);
|
||||
compound.setInteger("DigSpeed", this.digSpeed);
|
||||
compound.setInteger("AttackSpeed",this.attackSpeed);
|
||||
compound.setInteger("ArmorType", this.armorType);
|
||||
compound.setInteger("Enchantability", this.enchantability);
|
||||
|
||||
@@ -87,6 +89,7 @@ public class LinkedItem implements ILinkedItem {
|
||||
this.isTool = compound.getBoolean("IsTool");
|
||||
this.isNormalItem = compound.getBoolean("IsNormalItem");
|
||||
this.digSpeed = compound.getInteger("DigSpeed");
|
||||
this.attackSpeed = compound.getInteger("AttackSpeed");
|
||||
this.armorType = compound.getInteger("ArmorType");
|
||||
this.enchantability = compound.getInteger("Enchantability");
|
||||
|
||||
@@ -251,4 +254,10 @@ public class LinkedItem implements ILinkedItem {
|
||||
setScriptHandler(data = new LinkedItemScript());
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAttackSpeed() {return attackSpeed;}
|
||||
|
||||
@Override
|
||||
public void setAttackSpeed(int time) {this.attackSpeed = time;}
|
||||
}
|
||||
Reference in new issue
Block a user