diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/entity/player/JavaPlayerPositionTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/entity/player/JavaPlayerPositionTranslator.java index 413833acf..5fc7f7200 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/entity/player/JavaPlayerPositionTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/entity/player/JavaPlayerPositionTranslator.java @@ -53,7 +53,7 @@ public class JavaPlayerPositionTranslator extends PacketTranslator 32 && !session.isEmulatePost1_13Logic()) { // See DimensionUtils for an explanation @@ -92,23 +92,23 @@ public class JavaPlayerPositionTranslator extends PacketTranslator { //TODO DustParticleData data = (DustParticleData) particle.getData(); - int r = (int) (data.getRed() * 255); - int g = (int) (data.getGreen() * 255); - int b = (int) (data.getBlue() * 255); - int rgbData = ((0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); +// int r = (int) (data.getRed() * 255); +// int g = (int) (data.getGreen() * 255); +// int b = (int) (data.getBlue() * 255); +// int rgbData = ((0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); + int rgbData = data.getColor(); // TEST return (position) -> { LevelEventPacket packet = new LevelEventPacket(); packet.setType(ParticleType.FALLING_DUST); diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaSetTimeTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaSetTimeTranslator.java index 43ef0870a..b7a92dbd4 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaSetTimeTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/level/JavaSetTimeTranslator.java @@ -36,11 +36,9 @@ public class JavaSetTimeTranslator extends PacketTranslator= 0) { - // Client thinks there is no daylight cycle but there is - session.setDaylightCycle(true); - } else if (session.isDaylightCycle() && time < 0) { - // Client thinks there is daylight cycle but there isn't - session.setDaylightCycle(false); + + // We need to send a gamerule if this changed + if (session.isDaylightCycle() != packet.isTickDayTime()) { + session.setDaylightCycle(packet.isTickDayTime()); } } }