SPIGOT-1622: Add drop chance methods for off hand.
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -113,14 +113,36 @@ public class CraftEntityEquipment implements EntityEquipment {
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public float getItemInHandDropChance() {
|
public float getItemInHandDropChance() {
|
||||||
|
return getItemInMainHandDropChance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setItemInHandDropChance(float chance) {
|
||||||
|
setItemInMainHandDropChance(chance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getItemInMainHandDropChance() {
|
||||||
return getDropChance(EnumItemSlot.MAINHAND);
|
return getDropChance(EnumItemSlot.MAINHAND);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemInHandDropChance(float chance) {
|
@Override
|
||||||
|
public void setItemInMainHandDropChance(float chance) {
|
||||||
setDropChance(EnumItemSlot.MAINHAND, chance);
|
setDropChance(EnumItemSlot.MAINHAND, chance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getItemInOffHandDropChance() {
|
||||||
|
return getDropChance(EnumItemSlot.OFFHAND);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setItemInOffHandDropChance(float chance) {
|
||||||
|
setDropChance(EnumItemSlot.OFFHAND, chance);
|
||||||
|
}
|
||||||
|
|
||||||
public float getHelmetDropChance() {
|
public float getHelmetDropChance() {
|
||||||
return getDropChance(EnumItemSlot.HEAD);
|
return getDropChance(EnumItemSlot.HEAD);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,11 +191,33 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
|
|||||||
return (HumanEntity) inventory.getOwner();
|
return (HumanEntity) inventory.getOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public float getItemInHandDropChance() {
|
public float getItemInHandDropChance() {
|
||||||
|
return getItemInMainHandDropChance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setItemInHandDropChance(float chance) {
|
||||||
|
setItemInMainHandDropChance(chance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getItemInMainHandDropChance() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setItemInHandDropChance(float chance) {
|
@Override
|
||||||
|
public void setItemInMainHandDropChance(float chance) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getItemInOffHandDropChance() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setItemInOffHandDropChance(float chance) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user