mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Swap some nullable annotations (#10960)
This commit is contained in:
@@ -1020,21 +1020,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @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
|
||||
}
|
||||
|
Reference in New Issue
Block a user