Remove debug log spam & fix crashes

- Remove debug messages when receiving packets
- Fix dedicated server crashes on Fabric and Neoforge
This commit is contained in:
Martin Prokoph
2024-06-19 13:21:22 +02:00
parent cd9db8c8bc
commit 51c354c533
7 changed files with 56 additions and 38 deletions

View File

@@ -78,7 +78,6 @@ public class VisualOverhaulClientFabric implements ClientModInitializer {
ClientPlayNetworking.registerGlobalReceiver(UpdateItemsPacket.PACKET_ID,
(payload, context) -> context.client().execute(() -> {
System.out.println(payload.blockTypeID().toString());
if (payload.blockTypeID().equals(UPDATE_TYPE_RECORD)) jukeboxItems.put(payload.pos(), payload.inv().getFirst());
else if (context.client().world != null && context.client().world.getBlockEntity(payload.pos()) != null) {
if (payload.blockTypeID().equals(UPDATE_TYPE_POTION_BOTTLES) && context.client().world.getBlockEntity(payload.pos()) instanceof BrewingStandBlockEntity brewingStand) {