mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07:00
Add Arrow/Stinger Removal Time API (#10193)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user