Fix more compile issues

This commit is contained in:
Nassim Jahnke 2024-06-14 14:11:52 +02:00
parent 3c04f9f668
commit 0d3ce2d704
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
595 changed files with 544 additions and 603 deletions

View file

@ -13,7 +13,7 @@ public net/minecraft/server/level/ServerPlayer completeUsingItem()V
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index bb81e0bfe0692e8f8421758cd21c003978853a08..8f43b8e3ba64ac150f35c6056178934e5de04b2d 100644
index bb81e0bfe0692e8f8421758cd21c003978853a08..e77380686b9f0c5695be36b3e16e11b2646ac00a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -853,4 +853,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -50,7 +50,7 @@ index bb81e0bfe0692e8f8421758cd21c003978853a08..8f43b8e3ba64ac150f35c6056178934e
+ @Override
+ public void setActiveItemRemainingTime(final int ticks) {
+ Preconditions.checkArgument(ticks >= 0, "ticks must be >= 0");
+ Preconditions.checkArgument(ticks <= this.getHandle().getUseItem().getUseDuration(), "ticks must be <= item use duration");
+ Preconditions.checkArgument(ticks <= this.getHandle().getUseItem().getUseDuration(this.getHandle()), "ticks must be <= item use duration");
+ this.getHandle().useItemRemaining = ticks;
+ }
+