Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
SPIGOT-1622: Add drop chance methods for off hand.
Dieser Commit ist enthalten in:
Ursprung
912dfae454
Commit
b0411e8799
@ -113,14 +113,36 @@ public class CraftEntityEquipment implements EntityEquipment {
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getItemInHandDropChance() {
|
||||
return getItemInMainHandDropChance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemInHandDropChance(float chance) {
|
||||
setItemInMainHandDropChance(chance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getItemInMainHandDropChance() {
|
||||
return getDropChance(EnumItemSlot.MAINHAND);
|
||||
}
|
||||
|
||||
public void setItemInHandDropChance(float chance) {
|
||||
@Override
|
||||
public void setItemInMainHandDropChance(float 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() {
|
||||
return getDropChance(EnumItemSlot.HEAD);
|
||||
}
|
||||
|
@ -191,11 +191,33 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
|
||||
return (HumanEntity) inventory.getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getItemInHandDropChance() {
|
||||
return getItemInMainHandDropChance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemInHandDropChance(float chance) {
|
||||
setItemInMainHandDropChance(chance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getItemInMainHandDropChance() {
|
||||
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();
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren