mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 19:22:50 +01:00
Fix nether world border center not adjusting
This commit is contained in:
parent
4e27449ac2
commit
03f1e37ae2
2 changed files with 31 additions and 0 deletions
15
nms-patches/PacketPlayOutWorldBorder.patch
Normal file
15
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
nms-patches/WorldProviderHell.patch
Normal file
16
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 a new issue