3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Don't show block break animation at all in creative

Dieser Commit ist enthalten in:
RednedEpic 2020-04-30 00:53:28 -05:00
Ursprung 0ac4789f2c
Commit f057edb526
2 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -61,6 +61,9 @@ public class JavaPlayerActionAckTranslator extends PacketTranslator<ServerPlayer
ChunkUtils.updateBlock(session, packet.getNewState(), packet.getPosition()); ChunkUtils.updateBlock(session, packet.getNewState(), packet.getPosition());
break; break;
case START_DIGGING: case START_DIGGING:
if (session.getGameMode() == GameMode.CREATIVE) {
break;
}
blockHardness = BlockTranslator.JAVA_RUNTIME_ID_TO_HARDNESS.get(packet.getNewState().getId()); blockHardness = BlockTranslator.JAVA_RUNTIME_ID_TO_HARDNESS.get(packet.getNewState().getId());
levelEvent.setType(LevelEventType.BLOCK_START_BREAK); levelEvent.setType(LevelEventType.BLOCK_START_BREAK);
levelEvent.setPosition(Vector3f.from( levelEvent.setPosition(Vector3f.from(

Datei anzeigen

@ -41,6 +41,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import org.geysermc.connector.GeyserConnector; import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.network.translators.item.ItemEntry; import org.geysermc.connector.network.translators.item.ItemEntry;
import org.geysermc.connector.network.translators.item.ToolItemEntry; import org.geysermc.connector.network.translators.item.ToolItemEntry;
import org.geysermc.connector.network.translators.sound.SoundHandlerRegistry;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
@ -145,6 +146,9 @@ public class Toolbox {
// Load the locale data // Load the locale data
LocaleUtils.init(); LocaleUtils.init();
// Load sound handlers
SoundHandlerRegistry.init();
/* Load creative items */ /* Load creative items */
stream = getResource("bedrock/creative_items.json"); stream = getResource("bedrock/creative_items.json");