Add Arrow/Stinger Removal Time API (#10193)
This commit is contained in:
parent
6591c39509
commit
03d5d38a6a
4 changed files with 70 additions and 4 deletions
|
@ -17,12 +17,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public int getBeeStingerCooldown() {
|
||||
+ return getHandle().removeStingerTime;
|
||||
+ }
|
||||
+
|
||||
|
||||
// Paper start - Add methods for working with arrows stuck in living entities
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
}
|
||||
// Paper end - Add methods for working with arrows stuck in living entities
|
||||
|
||||
+ @Override
|
||||
+ public void setBeeStingerCooldown(int ticks) {
|
||||
+ getHandle().removeStingerTime = ticks;
|
||||
+ }
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public int getBeeStingersInBody() {
|
||||
+ return getHandle().getStingerCount();
|
||||
|
@ -33,7 +39,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Preconditions.checkArgument(count >= 0, "New bee stinger amount must be >= 0");
|
||||
+ getHandle().setStingerCount(count);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setNextBeeStingerRemoval(final int ticks) {
|
||||
+ Preconditions.checkArgument(ticks >= 0, "New amount of ticks before next bee stinger removal must be >= 0");
|
||||
+ this.getHandle().removeStingerTime = ticks;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getNextBeeStingerRemoval() {
|
||||
+ return this.getHandle().removeStingerTime;
|
||||
+ }
|
||||
+ // Paper end - Bee Stinger API
|
||||
+
|
||||
@Override
|
||||
public void damage(double amount) {
|
||||
this.damage(amount, null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue