mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
SPIGOT-5121: Method to set PierceLevel of arrows
By: md_5 <git@md-5.net>
This commit is contained in:
parent
2667bfc200
commit
d3a55e3c6e
@ -39,6 +39,18 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow {
|
|||||||
getHandle().setDamage(damage);
|
getHandle().setDamage(damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPierceLevel() {
|
||||||
|
return getHandle().s(); // PAIL: rename
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPierceLevel(int pierceLevel) {
|
||||||
|
Preconditions.checkArgument(0 <= pierceLevel && pierceLevel <= Byte.MAX_VALUE, "Pierce level out of range, expected 0 < level < 127");
|
||||||
|
|
||||||
|
getHandle().b((byte) pierceLevel); // PAIL: rename
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCritical() {
|
public boolean isCritical() {
|
||||||
return getHandle().isCritical();
|
return getHandle().isCritical();
|
||||||
|
Loading…
Reference in New Issue
Block a user