Fix nether world border center not adjusting
Dieser Commit ist enthalten in:
Ursprung
4e27449ac2
Commit
03f1e37ae2
15
nms-patches/PacketPlayOutWorldBorder.patch
Normale Datei
15
nms-patches/PacketPlayOutWorldBorder.patch
Normale Datei
@ -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
Normale Datei
16
nms-patches/WorldProviderHell.patch
Normale Datei
@ -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
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren