From ff13975bc7736cef79c3161754e5622c2f9658b1 Mon Sep 17 00:00:00 2001 From: MeowMC <70984351+MeowMC@users.noreply.github.com> Date: Thu, 8 Apr 2021 16:17:51 -0400 Subject: [PATCH] add this shit back --- .../tk/meowmc/portalgun/client/PortalgunClient.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/tk/meowmc/portalgun/client/PortalgunClient.java b/src/main/java/tk/meowmc/portalgun/client/PortalgunClient.java index ab4348a..1c1ec5c 100644 --- a/src/main/java/tk/meowmc/portalgun/client/PortalgunClient.java +++ b/src/main/java/tk/meowmc/portalgun/client/PortalgunClient.java @@ -22,8 +22,10 @@ public void onInitializeClient() { KeyBinding clearPortals = KeyBindingHelper.registerKeyBinding(new KeyBinding("key.portalgun.clearportals", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_R, "category.portalgun")); ClientTickEvents.END_CLIENT_TICK.register(client -> { while (clearPortals.wasPressed()) { - McRemoteProcedureCall.tellServerToInvoke("tk.meowmc.portalgun.misc.RemoteCallables.removeOldPortal1"); - McRemoteProcedureCall.tellServerToInvoke("tk.meowmc.portalgun.misc.RemoteCallables.removeOldPortal2"); + McHelper.executeOnServerThread(() -> { + McRemoteProcedureCall.tellServerToInvoke("tk.meowmc.portalgun.misc.RemoteCallables.removeOldPortal1"); + McRemoteProcedureCall.tellServerToInvoke("tk.meowmc.portalgun.misc.RemoteCallables.removeOldPortal2"); + }); } }); @@ -36,7 +38,9 @@ public void onInitializeClient() { // Portalgun.logInt(Level.INFO, tickCounter); if (delay) { - McRemoteProcedureCall.tellServerToInvoke("tk.meowmc.portalgun.misc.RemoteCallables.portal1Place"); + McHelper.executeOnServerThread(() -> { + McRemoteProcedureCall.tellServerToInvoke("tk.meowmc.portalgun.misc.RemoteCallables.portal1Place"); + }); } } });