From 3f45b2168979b41ccb1096427842fc01cf817ff4 Mon Sep 17 00:00:00 2001 From: EOT3000 <43685885+EOT3000@users.noreply.github.com> Date: Sat, 14 Sep 2019 19:21:55 -0400 Subject: [PATCH] Block changes work (again) --- .../main/java/org/geysermc/connector/GeyserConnector.java | 6 ++++++ .../connector/network/translators/item/BedrockItem.java | 1 + .../translators/java/world/JavaBlockChangeTranslator.java | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/GeyserConnector.java b/connector/src/main/java/org/geysermc/connector/GeyserConnector.java index 28ab191a..bb2a0429 100644 --- a/connector/src/main/java/org/geysermc/connector/GeyserConnector.java +++ b/connector/src/main/java/org/geysermc/connector/GeyserConnector.java @@ -91,6 +91,12 @@ public class GeyserConnector implements Connector { } private GeyserConnector() { + + System.out.println(12 << 4); + System.out.println(2 << 2); + System.out.println(1 << 2 | 4); + System.out.println(23 << 3); + System.out.println(UUID.randomUUID().toString()); //Metric if(!(System.console() == null) && System.getProperty("os.name", "Windows 10").toLowerCase().contains("windows")) { diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/item/BedrockItem.java b/connector/src/main/java/org/geysermc/connector/network/translators/item/BedrockItem.java index 69afbff9..c762b985 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/item/BedrockItem.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/item/BedrockItem.java @@ -33,6 +33,7 @@ import lombok.Getter; public class BedrockItem { public static BedrockItem AIR = new BedrockItem("minecraft:air", 0, 0); + public static BedrockItem DIRT = new BedrockItem("minecraft:dirt", 3, 0); private String identifier; private int id; diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java index f33148c8..5037269c 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java @@ -4,10 +4,12 @@ import com.flowpowered.math.vector.Vector3i; import com.github.steveice10.mc.protocol.data.game.world.block.BlockChangeRecord; import com.github.steveice10.mc.protocol.packet.ingame.server.world.ServerBlockChangePacket; import com.nukkitx.protocol.bedrock.packet.UpdateBlockPacket; +import org.geysermc.api.Geyser; import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.PacketTranslator; import org.geysermc.connector.network.translators.item.BedrockItem; import org.geysermc.connector.network.translators.item.ItemTranslator; +import org.geysermc.connector.world.GlobalBlockPalette; public class JavaBlockChangeTranslator extends PacketTranslator { @Override @@ -19,7 +21,7 @@ public class JavaBlockChangeTranslator extends PacketTranslator