mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-31 04:31:38 +01:00
Add "Waving banner workaround"
This commit is contained in:
parent
d24502015a
commit
100cd60c65
35
Spigot-Server-Patches/Waving-banner-workaround.patch
Normal file
35
Spigot-Server-Patches/Waving-banner-workaround.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Gabscap <sonstige.netzwerke@gabriel-paradzik.de>
|
||||
Date: Sat, 19 Mar 2016 22:25:11 +0100
|
||||
Subject: [PATCH] Waving banner workaround
|
||||
|
||||
This patch is a workaround for MC-63720
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||
@@ -0,0 +0,0 @@ import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
+ // World Age in ticks
|
||||
+ // Not changed by server commands
|
||||
private long a;
|
||||
+ // Time of Day in ticks
|
||||
+ // If negative the sun will stop moving at the Math.abs of the time
|
||||
private long b;
|
||||
|
||||
public PacketPlayOutUpdateTime() {}
|
||||
@@ -0,0 +0,0 @@ public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ this.a = this.a % 192000; // World age must not be negative
|
||||
+ this.b = this.b % 192000 - (this.b < 0 ? 192000 : 0); // Keep sign
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
--
|
@ -5037,6 +5037,49 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private EnumResourcePackStatus() {}
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.IOException;
|
||||
+
|
||||
+public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
||||
+
|
||||
+ private long a;
|
||||
+ private long b;
|
||||
+
|
||||
+ public PacketPlayOutUpdateTime() {}
|
||||
+
|
||||
+ public PacketPlayOutUpdateTime(long i, long j, boolean flag) {
|
||||
+ this.a = i;
|
||||
+ this.b = j;
|
||||
+ if (!flag) {
|
||||
+ this.b = -this.b;
|
||||
+ if (this.b == 0L) {
|
||||
+ this.b = -1L;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
+ this.a = packetdataserializer.readLong();
|
||||
+ this.b = packetdataserializer.readLong();
|
||||
+ }
|
||||
+
|
||||
+ public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
+ packetdataserializer.writeLong(this.a);
|
||||
+ packetdataserializer.writeLong(this.b);
|
||||
+ }
|
||||
+
|
||||
+ public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
+ packetlistenerplayout.a(this);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
Loading…
Reference in New Issue
Block a user