Tweak recipe syncing

This commit is contained in:
Vincent Lee committed 2019-10-18 12:42:53 -05:00
1 parent 435e5e4ff0
commit d69389a32e
4 files changed
+98 -60

No files matched your search

@@ -58,6 +58,12 @@ public final class PacketHandler {
HANDLER.sendTo(toSend, playerMP.connection.getNetworkManager(), NetworkDirection.PLAY_TO_CLIENT);
}
public static void sendNonLocal(ServerPlayerEntity playerMP, Object toSend) {
if(playerMP.server.isDedicatedServer() || !playerMP.getGameProfile().getName().equals(playerMP.server.getServerOwner())) {
sendTo(playerMP, toSend);
}
}
public static void sendToServer(Object msg) {
HANDLER.sendToServer(msg);
}