mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-11-23 15:26:37 +01:00
Don't show block break animation at all in creative
This commit is contained in:
parent
0ac4789f2c
commit
f057edb526
2 changed files with 7 additions and 0 deletions
|
@ -61,6 +61,9 @@ public class JavaPlayerActionAckTranslator extends PacketTranslator<ServerPlayer
|
|||
ChunkUtils.updateBlock(session, packet.getNewState(), packet.getPosition());
|
||||
break;
|
||||
case START_DIGGING:
|
||||
if (session.getGameMode() == GameMode.CREATIVE) {
|
||||
break;
|
||||
}
|
||||
blockHardness = BlockTranslator.JAVA_RUNTIME_ID_TO_HARDNESS.get(packet.getNewState().getId());
|
||||
levelEvent.setType(LevelEventType.BLOCK_START_BREAK);
|
||||
levelEvent.setPosition(Vector3f.from(
|
||||
|
|
|
@ -41,6 +41,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
|||
import org.geysermc.connector.GeyserConnector;
|
||||
import org.geysermc.connector.network.translators.item.ItemEntry;
|
||||
import org.geysermc.connector.network.translators.item.ToolItemEntry;
|
||||
import org.geysermc.connector.network.translators.sound.SoundHandlerRegistry;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
@ -145,6 +146,9 @@ public class Toolbox {
|
|||
// Load the locale data
|
||||
LocaleUtils.init();
|
||||
|
||||
// Load sound handlers
|
||||
SoundHandlerRegistry.init();
|
||||
|
||||
/* Load creative items */
|
||||
stream = getResource("bedrock/creative_items.json");
|
||||
|
||||
|
|
Loading…
Reference in a new issue