mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:41:29 +01:00
Fix nether world border center not adjusting
By: md_5 <git@md-5.net>
This commit is contained in:
parent
7b0417e439
commit
ff815b0065
15
paper-server/nms-patches/PacketPlayOutWorldBorder.patch
Normal file
15
paper-server/nms-patches/PacketPlayOutWorldBorder.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/server/PacketPlayOutWorldBorder.java
|
||||
+++ b/net/minecraft/server/PacketPlayOutWorldBorder.java
|
||||
@@ -18,8 +18,10 @@
|
||||
|
||||
public PacketPlayOutWorldBorder(WorldBorder worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction packetplayoutworldborder_enumworldborderaction) {
|
||||
this.a = packetplayoutworldborder_enumworldborderaction;
|
||||
- this.c = worldborder.getCenterX();
|
||||
- this.d = worldborder.getCenterZ();
|
||||
+ // CraftBukkit start - multiply out nether border
|
||||
+ this.c = worldborder.getCenterX() * (worldborder.world.worldProvider instanceof WorldProviderHell ? 8 : 1);
|
||||
+ this.d = worldborder.getCenterZ() * (worldborder.world.worldProvider instanceof WorldProviderHell ? 8 : 1);
|
||||
+ // CraftBukkit end
|
||||
this.f = worldborder.getSize();
|
||||
this.e = worldborder.j();
|
||||
this.g = worldborder.i();
|
16
paper-server/nms-patches/WorldProviderHell.patch
Normal file
16
paper-server/nms-patches/WorldProviderHell.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/server/WorldProviderHell.java
|
||||
+++ b/net/minecraft/server/WorldProviderHell.java
|
||||
@@ -44,11 +44,11 @@
|
||||
public WorldBorder getWorldBorder() {
|
||||
return new WorldBorder() {
|
||||
public double getCenterX() {
|
||||
- return super.getCenterX() / 8.0D;
|
||||
+ return super.getCenterX(); // CraftBukkit
|
||||
}
|
||||
|
||||
public double getCenterZ() {
|
||||
- return super.getCenterZ() / 8.0D;
|
||||
+ return super.getCenterZ(); // CraftBukkit
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user