aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0562-Missing-Entity-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0562-Missing-Entity-API.patch')
-rw-r--r--patches/server/0562-Missing-Entity-API.patch16
1 files changed, 4 insertions, 12 deletions
diff --git a/patches/server/0562-Missing-Entity-API.patch b/patches/server/0562-Missing-Entity-API.patch
index 7c6acb3b14..6c433c2da4 100644
--- a/patches/server/0562-Missing-Entity-API.patch
+++ b/patches/server/0562-Missing-Entity-API.patch
@@ -1009,10 +1009,10 @@ index 5467e4a74b70ff57b49d9e6bc686c493178f8511..01d104d91de9e1319d27e39d3f474318
public boolean isRolling() {
return this.getHandle().isRolling();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
-index 9304e201db1ec96d0916aa8ea781f3e4bc7991e6..8338effd39b1709dbe578e247710a8e58d83e3aa 100644
+index 9304e201db1ec96d0916aa8ea781f3e4bc7991e6..83e77c6d287d8e239d2f55f3e9f19ef74946be7c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
-@@ -44,5 +44,25 @@ public class CraftPhantom extends CraftFlying implements Phantom, CraftEnemy {
+@@ -44,5 +44,17 @@ public class CraftPhantom extends CraftFlying implements Phantom, CraftEnemy {
public void setShouldBurnInDay(boolean shouldBurnInDay) {
getHandle().setShouldBurnInDay(shouldBurnInDay);
}
@@ -1020,21 +1020,13 @@ index 9304e201db1ec96d0916aa8ea781f3e4bc7991e6..8338effd39b1709dbe578e247710a8e5
+ @Override
+ public org.bukkit.Location getAnchorLocation() {
+ net.minecraft.core.BlockPos pos = this.getHandle().anchorPoint;
-+ if (pos == null) {
-+ return null;
-+ }
-+
+ return io.papermc.paper.util.MCUtil.toLocation(this.getHandle().level(), pos);
+ }
+
+ @Override
+ public void setAnchorLocation(org.bukkit.Location location) {
-+ net.minecraft.core.BlockPos pos = null;
-+ if (location != null) {
-+ pos = io.papermc.paper.util.MCUtil.toBlockPosition(location);
-+ }
-+
-+ this.getHandle().anchorPoint = pos;
++ com.google.common.base.Preconditions.checkArgument(location != null, "location cannot be null");
++ this.getHandle().anchorPoint = io.papermc.paper.util.MCUtil.toBlockPosition(location);
+ }
// Paper end
}