Add Arrow/Stinger Removal Time API (#10193)

This commit is contained in:
Tamion 2024-02-09 21:56:13 +01:00 committed by GitHub
parent 534659e97e
commit 9c04729de1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 155 additions and 89 deletions

View file

@ -7,10 +7,10 @@ Upstream added methods for this so the original methods
are now deprecated
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..1fdbfb14eaef0550363c5dd9793f933d8ece16ac 100644
index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..eb8dcf3dc9acb171fec5b25342a9a38d7f9bcb36 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -217,12 +217,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -217,12 +217,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
public int getArrowsInBody();
@ -35,10 +35,28 @@ index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..1fdbfb14eaef0550363c5dd9793f933d
*/
- public void setArrowsInBody(int count);
+ void setArrowsInBody(int count, boolean fireEvent); // Paper
+
+ // Paper start - Add methods for working with arrows stuck in living entities
+ /**
+ * Sets the amount of ticks before the next arrow gets removed from the entities body.
+ * <p>
+ * A value of 0 will cause the server to re-calculate the amount of ticks on the next tick.
+ *
+ * @param ticks Amount of ticks
+ */
+ void setNextArrowRemoval(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int ticks);
+
+ /**
+ * Gets the amount of ticks before the next arrow gets removed from the entities body.
+ *
+ * @return ticks Amount of ticks
+ */
+ int getNextArrowRemoval();
+ // Paper end - Add methods for working with arrows stuck in living entities
/**
* Returns the living entity's current maximum no damage ticks.
@@ -749,4 +763,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -749,4 +781,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @return Whether the entity is invisible
*/
public boolean isInvisible();

View file

@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 1fdbfb14eaef0550363c5dd9793f933d8ece16ac..f0dd1a3d2d03366de104ba7d07f19fc9a2221925 100644
index b67e6eca393b66c92fc62b35123bb3eb2f372b7c..c8c88c08d2f03cff267e76749156c584bf7adf42 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -321,6 +321,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -339,6 +339,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@Nullable
public Player getKiller();

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index f0dd1a3d2d03366de104ba7d07f19fc9a2221925..9be2901986b14bc4a66a25fa3be231e2738b3792 100644
index c8c88c08d2f03cff267e76749156c584bf7adf42..dd5c5e0ec342cea1bf9efbd0aa28ae0e0ed2f6b9 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -791,5 +791,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -809,5 +809,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated
void setArrowsStuck(int arrows);

View file

@ -20,10 +20,10 @@ index b3aa3dc6aa5afbc36cc86741b4cba56f463c2234..9e012c3c0671e5d0e55c243fdb4e1405
public ItemStack getItemInUse();
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 9be2901986b14bc4a66a25fa3be231e2738b3792..3a2f5ba52c6be8930f7b411476b36afc161834c9 100644
index dd5c5e0ec342cea1bf9efbd0aa28ae0e0ed2f6b9..fd98b9de7714e2082e521f29dc162003e3d39ee2 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -805,5 +805,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -823,5 +823,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param delay Delay in ticks
*/
void setShieldBlockingDelay(int delay);

View file

@ -659,7 +659,7 @@ index 985dcea9ebed2fc5a3bfb8581cbd0ee4bf89ee8f..08eb8744104f1bbbd4f96972e0fb68f1
public static Environment getEnvironment(int id) {
return lookup.get(id);
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index f3a18e337a579b602b1289bccdf454334a663fcf..c22f333174bd6b8860ee06a71f713e4be8fa64ec 100644
index a71001677e2b1b0b6225a7be63b8ea5ce4456862..c7ef0386a09a07a2317c56274ed41218dfd7153d 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -526,7 +526,7 @@ public interface Block extends Metadatable, Translatable {
@ -820,10 +820,10 @@ index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f22
+@Deprecated(forRemoval = true) // Paper
public interface LingeringPotion extends ThrownPotion { }
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 47c4096699bc0334eacf10b6403c4a4329797f0e..f52ac8b1063806e63f81a2107c4272f05314472b 100644
index 4605153a2a8aa7b7cd0eed772c15f02f18707ec3..c58f7b4a7c05e35056a478a818a9a6cdfe99203f 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -666,7 +666,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -684,7 +684,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* This may have unexpected results if the entity is not in water.
*
* @param swimming True if the entity is swimming.

View file

@ -61,10 +61,10 @@ index 0000000000000000000000000000000000000000..a6306c957fcacdcbcc8037b4ee33a167
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index f52ac8b1063806e63f81a2107c4272f05314472b..1f1aa4c7499e8ab2fc43b12939021c8c9b683d29 100644
index c58f7b4a7c05e35056a478a818a9a6cdfe99203f..3f062e0fe9cb632dece9ce3fdc985ab1bf5a425f 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1007,5 +1007,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1025,5 +1025,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@NotNull
org.bukkit.inventory.EquipmentSlot getHandRaised();

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 1f1aa4c7499e8ab2fc43b12939021c8c9b683d29..a8fac70ec7158fd14cd72714fed3b4df2f8d8223 100644
index 3f062e0fe9cb632dece9ce3fdc985ab1bf5a425f..590d69f57722a40addf73131fa60e952f303230b 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1027,5 +1027,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1045,5 +1045,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param jumping entity jump state
*/
void setJumping(boolean jumping);

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index a8fac70ec7158fd14cd72714fed3b4df2f8d8223..92a84d28f06c4a95fe0d5b2a3c1f73f0b07839d5 100644
index 590d69f57722a40addf73131fa60e952f303230b..191a3c3ee46649d2a539597258485752b34fac02 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -978,6 +978,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -996,6 +996,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull
org.bukkit.inventory.ItemStack getActiveItem();

View file

@ -26,10 +26,10 @@ index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50d
* Get the sleep ticks of the player. This value may be capped.
*
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 92a84d28f06c4a95fe0d5b2a3c1f73f0b07839d5..2d634e03c14d9f6fdc767e7dfe35e8ae0088cee9 100644
index 191a3c3ee46649d2a539597258485752b34fac02..62d0d2fe3c6dfc9faaa821bde074b623914e4a44 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1057,5 +1057,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1075,5 +1075,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param quantity quantity of item
*/
void playPickupItemAnimation(@NotNull Item item, int quantity);

View file

@ -23,10 +23,10 @@ index d8b1fa79dc24138dc71e32c14bda71c1d570ed88..b68367f123f029c3ff47eab6bfabd7a8
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 2d634e03c14d9f6fdc767e7dfe35e8ae0088cee9..ef31d309ec21174aafe54a219440bf8508fd0ac8 100644
index 62d0d2fe3c6dfc9faaa821bde074b623914e4a44..129df18c471f1ec0c286746953ae8803a209cfa7 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -572,6 +572,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -590,6 +590,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
public boolean hasLineOfSight(@NotNull Entity other);

View file

@ -556,10 +556,10 @@ index 6b3c9bef9a8a34ddc6ff42cf358541a2665bf5e3..9c618a27d590f186f29c5d9094fc565e
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index ef31d309ec21174aafe54a219440bf8508fd0ac8..adf2870ab81b6ff8f595e11b55f043c4fd51281e 100644
index 129df18c471f1ec0c286746953ae8803a209cfa7..ca74b215d226db16259e9ca9c930a49b3e444a7a 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -998,6 +998,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1016,6 +1016,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
void clearActiveItem();
// Paper end

View file

@ -5,12 +5,12 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index adf2870ab81b6ff8f595e11b55f043c4fd51281e..2976955607f9cbb9b552aa43f25b5b9d52f7437e 100644
index 6e6b80843a8669b422f93e98343e1da9f8546ee7..d083cffe0b61642bf4c4ea0fecc529090702042f 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -401,6 +401,36 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setArrowsInBody(int count, boolean fireEvent); // Paper
@@ -419,6 +419,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
int getNextArrowRemoval();
// Paper end - Add methods for working with arrows stuck in living entities
+ // Paper start - Bee Stinger API
+ /**
@ -40,6 +40,22 @@ index adf2870ab81b6ff8f595e11b55f043c4fd51281e..2976955607f9cbb9b552aa43f25b5b9d
+ * @param count amount of bee stingers in entity's body
+ */
+ public void setBeeStingersInBody(int count);
+
+ /**
+ * Sets the amount of ticks before the next bee stinger gets removed from the entities body.
+ * <p>
+ * A value of 0 will cause the server to re-calculate the amount of ticks on the next tick.
+ *
+ * @param ticks Amount of ticks
+ */
+ void setNextBeeStingerRemoval(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int ticks);
+
+ /**
+ * Gets the amount of ticks before the next bee stinger gets removed from the entities body.
+ *
+ * @return ticks Amount of ticks
+ */
+ int getNextBeeStingerRemoval();
+ // Paper end - Stinger API
+
/**

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 3be060731b9b2df3408e8c5627a3640262cdc4d5..f9fe94d2bbfb5cd31ecc706e114be566fef7698a 100644
index ef13c72963af2356f37a724066fe5b42416dd3eb..d0ceef72c2691c441739a0100cb68504cbb3220e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1167,5 +1167,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1201,5 +1201,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
@Deprecated
void setHurtDirection(float hurtDirection);

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index f9fe94d2bbfb5cd31ecc706e114be566fef7698a..98956d13ac767cca447f53c10f1b1fedafad7fbf 100644
index d0ceef72c2691c441739a0100cb68504cbb3220e..798bcc0fe7d21179df885d30d8e0dc7d6eee3b40 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1185,5 +1185,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1219,5 +1219,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
this.swingOffHand();
}
}

View file

@ -8,10 +8,10 @@ to simulate damage done to an itemstack and all
the logic associated with damaging them
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b1583317a0344809431f81f1cd9378f44343b04d..d1da5bb61633871e8fe778bd83b5a5eac20aacc7 100644
index 798bcc0fe7d21179df885d30d8e0dc7d6eee3b40..5b32ab4f1260183627aed7ba832f3237e5665011 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1197,5 +1197,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1231,5 +1231,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param directionZ The relative z position of the knockback source direction
*/
void knockback(double strength, double directionX, double directionZ);

View file

@ -53,10 +53,10 @@ index e5df511d962a59260207e8390d7da7782af5dc77..90c46483928e70f37a9900cada7dc679
// Paper start - Collision API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index c1b7f021cd268a0d6da0f2759469b88fae638648..7f185102ba3a417670313e75ee174a1024a1d514 100644
index 74cd1d4aee0d4ef79fd77ac689c1e9b5d082664d..15d26b5d4fd55a29680f7485c80e33b7ce787fbe 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1244,5 +1244,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1278,5 +1278,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param amount the amount of damage to do
*/
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 0b4cd106265c6c675bd27cd66a275a48217a7419..e68c71047b2bc1b456c380db25b3ff376852b4a9 100644
index 15d26b5d4fd55a29680f7485c80e33b7ce787fbe..f396c214e71efa2c46ad853e9d2c4b5048895917 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -591,6 +591,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -625,6 +625,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@NotNull
public Collection<PotionEffect> getActivePotionEffects();

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add HiddenPotionEffect API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index e68c71047b2bc1b456c380db25b3ff376852b4a9..47b0154928b3d36e2602da202df07defbcf82108 100644
index f396c214e71efa2c46ad853e9d2c4b5048895917..e6c78d1f4222badae27b49590c2f9be46608d5d1 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -525,6 +525,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -559,6 +559,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
/**
* Adds the given {@link PotionEffect} to the living entity.
@ -18,7 +18,7 @@ index e68c71047b2bc1b456c380db25b3ff376852b4a9..47b0154928b3d36e2602da202df07def
*
* @param effect PotionEffect to be added
* @return whether the effect could be added
@@ -549,6 +552,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -583,6 +586,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
/**
* Attempts to add all of the given {@link PotionEffect} to the living
* entity.

View file

@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 5825f942db3b9870631ff093708dee0e930fccc8..b93d03c1af8b82c009c3f6007cc30e888f6764e0 100644
index 5825f942db3b9870631ff093708dee0e930fccc8..690364b874212cca2fe2078efa7b8f3f7880e39f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -266,9 +266,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -266,10 +266,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@ -24,10 +24,24 @@ index 5825f942db3b9870631ff093708dee0e930fccc8..b93d03c1af8b82c009c3f6007cc30e88
+ this.getHandle().setArrowCount(count);
+ }
+ // Paper end
+ }
+
+ // Paper start - Add methods for working with arrows stuck in living entities
+ @Override
+ public void setNextArrowRemoval(final int ticks) {
+ Preconditions.checkArgument(ticks >= 0, "New amount of ticks before next arrow removal must be >= 0");
+ this.getHandle().removeArrowTime = ticks;
+ }
+
+ @Override
+ public int getNextArrowRemoval() {
+ return this.getHandle().removeArrowTime;
}
+ // Paper end - Add methods for working with arrows stuck in living entities
@Override
@@ -786,4 +792,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void damage(double amount) {
@@ -786,4 +805,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}

View file

@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index b93d03c1af8b82c009c3f6007cc30e888f6764e0..f1195a4dd11370066008aaf6c7c4a8b4d628d822 100644
index c5cc6beca76884fdf8eb7bacb619b4d5dedbd31a..f09064a6721481c202449ff12ba1d54385e24043 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -364,6 +364,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -377,6 +377,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
}

View file

@ -35,10 +35,10 @@ index 882bb83a552be415711c8df8118e91981fc63e46..f01a0d7a19329aabbfa69be68c48a409
return this.isShiftKeyDown();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index f1195a4dd11370066008aaf6c7c4a8b4d628d822..4ae1f2c25f3012cee5abdb579e6b452a78ba8a1c 100644
index f09064a6721481c202449ff12ba1d54385e24043..30c6d32040decc56947d7e8a840036262e122137 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -813,5 +813,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -826,5 +826,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setArrowsStuck(final int arrows) {
this.getHandle().setArrowCount(arrows);
}

View file

@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4ae1f2c25f3012cee5abdb579e6b452a78ba8a1c..a4af5db4d2d45429a46830e4af0ba45c8c5008be 100644
index 30c6d32040decc56947d7e8a840036262e122137..0c561653f81dbc64cc78b4a27185aa3de1f9946b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -823,5 +823,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -836,5 +836,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setShieldBlockingDelay(int delay) {
getHandle().setShieldBlockingDelay(delay);
}

View file

@ -50,10 +50,10 @@ index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c6295
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index fc7b54892af62e8b6e1cc93f2937e05bbfd01c8c..eed8322f534a9556dbb99c4c32b135dfc3dd8b0f 100644
index dbfeeacbb503aad5897c92c902d16fdbea7b793f..d5135ac97b2d4af7391a58799497c649cfcf8041 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -909,5 +909,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -922,5 +922,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public org.bukkit.inventory.EquipmentSlot getHandRaised() {
return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND;
}

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index eed8322f534a9556dbb99c4c32b135dfc3dd8b0f..6a34b4ed817c3be31d5103f82c427fdcd40d47c0 100644
index d5135ac97b2d4af7391a58799497c649cfcf8041..c15db60f4a198c0fe754c3579ff93870e968e639 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -442,7 +442,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -455,7 +455,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {
@ -18,7 +18,7 @@ index eed8322f534a9556dbb99c4c32b135dfc3dd8b0f..6a34b4ed817c3be31d5103f82c427fdc
return true;
}
@@ -463,7 +463,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -476,7 +476,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public PotionEffect getPotionEffect(PotionEffectType type) {
MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraft(type));
@ -27,7 +27,7 @@ index eed8322f534a9556dbb99c4c32b135dfc3dd8b0f..6a34b4ed817c3be31d5103f82c427fdc
}
@Override
@@ -475,7 +475,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -488,7 +488,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public Collection<PotionEffect> getActivePotionEffects() {
List<PotionEffect> effects = new ArrayList<PotionEffect>();
for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 6a34b4ed817c3be31d5103f82c427fdcd40d47c0..c68a18f50428282cd3641561cdc9690b5d88b125 100644
index c15db60f4a198c0fe754c3579ff93870e968e639..2550546b200f331ef83b20bf5e119a003cadacba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -923,5 +923,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -936,5 +936,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
((Mob) getHandle()).getJumpControl().jump();
}
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index c68a18f50428282cd3641561cdc9690b5d88b125..ac8a148c6d9f0e25ab34d32b840efd42eb8ab46a 100644
index 2550546b200f331ef83b20bf5e119a003cadacba..88b1887c0d4d01ecedb1b622ee718993b4d92579 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -890,6 +890,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -903,6 +903,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return getHandle().getUseItem().asBukkitMirror();
}

View file

@ -36,10 +36,10 @@ index 93644aefd2e6c97eca2735812b2b7b4bd039cfb5..40f848d117c1a4f4fc2f11861c5f1420
public int getSleepTicks() {
return this.getHandle().sleepCounter;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index ac8a148c6d9f0e25ab34d32b840efd42eb8ab46a..f108af0f9047ce8d0ee402838ecbf7840d55ba54 100644
index 88b1887c0d4d01ecedb1b622ee718993b4d92579..30934acb059016a996b2c3b2f635e606d4e8a526 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -935,5 +935,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -948,5 +948,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
getHandle().take(((CraftItem) item).getHandle(), quantity);
}

View file

@ -38,10 +38,10 @@ index ea48f1119a940056c37d1d203437bfbfdf13663b..8a678df56fcf30535957e111d81ad07b
+ // Paper end - living entity allow attribute registration
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index f108af0f9047ce8d0ee402838ecbf7840d55ba54..f874712c1569a30c825c1a904a3bcfbe1085200b 100644
index 30934acb059016a996b2c3b2f635e606d4e8a526..7d8d503b46b1380e4b8a52d76fc5cc55759de80b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -713,6 +713,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -726,6 +726,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().craftAttributes.getAttribute(attribute);
}

View file

@ -78,10 +78,10 @@ index 7aa4035a4df1ddcc71065034eafd569ca59be810..5b7579395e61684592758f408d61cffe
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index f874712c1569a30c825c1a904a3bcfbe1085200b..706c4b962837f0b881e7603ea736d364370ff36a 100644
index 7d8d503b46b1380e4b8a52d76fc5cc55759de80b..1474177f66a1428406bec2c55cd995a172f27dcf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -952,5 +952,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -965,5 +965,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setHurtDirection(float hurtDirection) {
throw new UnsupportedOperationException("Cannot set the hurt direction on a non player");
}

View file

@ -45,10 +45,10 @@ index 9cd267f53505658d1c75187b662c4d9f68cd6bae..5f4958d28b6d79fe9e589e4794d9a7e8
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 706c4b962837f0b881e7603ea736d364370ff36a..7ff701f2421ca766cc35580f1c93b24f8c843f10 100644
index 1474177f66a1428406bec2c55cd995a172f27dcf..55bb8e5e8e09e35320094389bf68d204d21e4f9e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -586,6 +586,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -599,6 +599,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
}

View file

@ -748,10 +748,10 @@ index 2cec61a1bb050c1ef81c5fc3d0afafe9ff29d459..97fa4e1e70203194bd939618b2fad926
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 7ff701f2421ca766cc35580f1c93b24f8c843f10..796412196f26f22b639b82192a3288a81ebd10b4 100644
index 55bb8e5e8e09e35320094389bf68d204d21e4f9e..ed4ccda0063b4cf52fe6a4ded42c17aca396e6ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -887,6 +887,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -900,6 +900,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 796412196f26f22b639b82192a3288a81ebd10b4..711f4ca8ee42a14e40af86d93a9685b4b9a2ba99 100644
index 5effef8e6a360b4d6910be9f4b7a5363d38675ed..33d5e64fa76ef789a51197e5ec3b5ebbcb82b8c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -337,7 +337,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -337,6 +337,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
// Paper end
}
@ -17,12 +17,18 @@ index 796412196f26f22b639b82192a3288a81ebd10b4..711f4ca8ee42a14e40af86d93a9685b4
+ public int getBeeStingerCooldown() {
+ return getHandle().removeStingerTime;
+ }
+
// Paper start - Add methods for working with arrows stuck in living entities
@Override
@@ -351,6 +356,34 @@ 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 796412196f26f22b639b82192a3288a81ebd10b4..711f4ca8ee42a14e40af86d93a9685b4
+ 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);

View file

@ -202,10 +202,10 @@ index 8a37dd71f1551ce27c1a729eab2a11c465b684e3..b58788161b758eee5fbaee3280c85511
ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(Holder.direct(SoundEvent.createVariableRangeEvent(new ResourceLocation(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 711f4ca8ee42a14e40af86d93a9685b4b9a2ba99..269664d3894835e5bafc39e65ee5245ae1d74d78 100644
index 1df7c8c94e3ed371a4cda5d72a3ceade59e454cc..cf0151ea68738783a5e8c2e49a001b3a41d0c91a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -463,6 +463,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -488,6 +488,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 269664d3894835e5bafc39e65ee5245ae1d74d78..62e089f181b0e329e96c2157492a266f11f628c3 100644
index cf0151ea68738783a5e8c2e49a001b3a41d0c91a..b7aee6c64ffc74924a1b211e097a15e8b27f18f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -508,8 +508,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -533,8 +533,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@ -25,7 +25,7 @@ index 269664d3894835e5bafc39e65ee5245ae1d74d78..62e089f181b0e329e96c2157492a266f
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
@@ -596,6 +603,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -621,6 +628,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity);
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 62e089f181b0e329e96c2157492a266f11f628c3..4b2ee2e1300203b2f3369cbf8ffcf1ad72153258 100644
index b7aee6c64ffc74924a1b211e097a15e8b27f18f7..6f22f12d37c647c65020bb547ffca95465675e31 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1035,5 +1035,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1060,5 +1060,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
}

View file

@ -11,10 +11,10 @@ the logic associated with damaging them
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4b2ee2e1300203b2f3369cbf8ffcf1ad72153258..d12734b0c6b10ca8997a79e06fc9791abe0e9ed5 100644
index 6f22f12d37c647c65020bb547ffca95465675e31..3777d6db6cb5099e9b1454a436262c89312fb442 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1036,6 +1036,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1061,6 +1061,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
}

View file

@ -133,10 +133,10 @@ index cbfd4cf1d7d32757cf124d1aaa4b83d8a155868f..832def3c518be8d6d81e71f6022566e6
public int getHealth() {
return this.getHandle().health;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d12734b0c6b10ca8997a79e06fc9791abe0e9ed5..97c7bb2032584847f2f8a946c1f8d13fef908edf 100644
index 3777d6db6cb5099e9b1454a436262c89312fb442..330f0f79e9f12c5faf2aa9898047304ae281c10b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1083,6 +1083,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1108,6 +1108,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
});
}

View file

@ -41,10 +41,10 @@ index 55a9c4eb0fe1b912e5ff6c9bb81b46674f71868a..e043a43ebda1df7b78c1368ce33a3648
// Paper start - Collision API
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 97c7bb2032584847f2f8a946c1f8d13fef908edf..310ce32708601d95cda2647e101d02d48ccdbb77 100644
index 330f0f79e9f12c5faf2aa9898047304ae281c10b..11a52a11891f5dca5f2a6b2e77b6a090f4a69726 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1075,6 +1075,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1100,6 +1100,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.damageItemStack0(this.getHandle().getItemBySlot(nmsSlot), amount, nmsSlot);
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 310ce32708601d95cda2647e101d02d48ccdbb77..4afc1c9d2a7638e84a55fe30932dc36db465c31a 100644
index 11a52a11891f5dca5f2a6b2e77b6a090f4a69726..12c0581076585dfe97903463c6ec0cbcdeba2806 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -502,6 +502,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -527,6 +527,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return effects;
}