fixes #152
This commit is contained in:
+2
-1
@@ -295,7 +295,8 @@ public class LeavesProtocolManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void handleTick() {
|
public static void handleTick() {
|
||||||
long currentTime = System.currentTimeMillis() / MinecraftServer.getServer().tickRateManager().nanosecondsPerTick();
|
float interval = MinecraftServer.getServer().tickRateManager().millisecondsPerTick();
|
||||||
|
long currentTime = interval >= 1 ? System.currentTimeMillis() / (long) MinecraftServer.getServer().tickRateManager().millisecondsPerTick() : (long) (System.currentTimeMillis() / MinecraftServer.getServer().tickRateManager().millisecondsPerTick());
|
||||||
if (currentTime == lastAcceptTime) return;
|
if (currentTime == lastAcceptTime) return;
|
||||||
lastAcceptTime = currentTime;
|
lastAcceptTime = currentTime;
|
||||||
for (var tickerInfo : TICKERS) {
|
for (var tickerInfo : TICKERS) {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class ProtocolUtils {
|
|||||||
private static final byte[] EMPTY = new byte[0];
|
private static final byte[] EMPTY = new byte[0];
|
||||||
|
|
||||||
public static String buildProtocolVersion(String protocol) {
|
public static String buildProtocolVersion(String protocol) {
|
||||||
return protocol + "-leaves-" + ServerBuildInfo.buildInfo().asString(ServerBuildInfo.StringRepresentation.VERSION_SIMPLE);
|
return protocol + "-lophine-" + ServerBuildInfo.buildInfo().asString(ServerBuildInfo.StringRepresentation.VERSION_SIMPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendEmptyPacket(ServerPlayer player, Identifier id) {
|
public static void sendEmptyPacket(ServerPlayer player, Identifier id) {
|
||||||
|
|||||||
+2
-1
@@ -345,7 +345,8 @@ public class ServuxStructuresProtocol implements LeavesProtocol {
|
|||||||
PACKET_C2S_STRUCTURES_UNREGISTER(4),
|
PACKET_C2S_STRUCTURES_UNREGISTER(4),
|
||||||
PACKET_S2C_STRUCTURE_DATA_START(5),
|
PACKET_S2C_STRUCTURE_DATA_START(5),
|
||||||
PACKET_S2C_SPAWN_METADATA(10),
|
PACKET_S2C_SPAWN_METADATA(10),
|
||||||
PACKET_C2S_REQUEST_SPAWN_METADATA(11);
|
PACKET_C2S_REQUEST_SPAWN_METADATA(11),
|
||||||
|
PACKET_S2C_WEATHER_DATA(12);
|
||||||
|
|
||||||
public final int type;
|
public final int type;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user