From 0ac4789f2c00280acace07a64388aa1b47847720 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Thu, 30 Apr 2020 00:45:27 -0500 Subject: [PATCH] Don't send sound updates if block of the same type already exists in placing position This prevents the block place sound (most notably buttons or blocks that don't occupy one whole block) from spamming the client if they have their place button held down. --- .../translators/java/world/JavaBlockChangeTranslator.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 600c4da4..2313a136 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 @@ -25,6 +25,7 @@ package org.geysermc.connector.network.translators.java.world; +import com.github.steveice10.mc.protocol.data.game.entity.metadata.Position; import com.nukkitx.math.vector.Vector3i; import com.nukkitx.protocol.bedrock.data.SoundEvent; import com.nukkitx.protocol.bedrock.packet.LevelSoundEventPacket; @@ -42,9 +43,13 @@ public class JavaBlockChangeTranslator extends PacketTranslator