Check direction of packets, don't overwrite recipes with sent ones in SP

Prevents lexicon upgrading after /reload losing other data on stack
This commit is contained in:
Hubry committed 2020-01-13 17:04:42 +01:00
1 parent e9166da71e
commit d5001c79c8
7 files changed
+71 -58

No files matched your search

@@ -15,9 +15,8 @@ public class PacketLeftClick {
}
public static void handle(PacketLeftClick msg, Supplier<NetworkEvent.Context> ctx) {
ctx.get().enqueueWork(() -> {
((ItemTerraSword) ModItems.terraSword).trySpawnBurst(ctx.get().getSender());
});
if (ctx.get().getDirection().getReceptionSide().isServer())
ctx.get().enqueueWork(() -> ((ItemTerraSword) ModItems.terraSword).trySpawnBurst(ctx.get().getSender()));
ctx.get().setPacketHandled(true);
}
}