Revert Some Multithreading for Synchronization

This commit is contained in:
Kam committed 2023-05-16 17:17:11 -04:00
1 parent 892d11b89b
commit 204e7a9c15
6 files changed
+20 -31

No files matched your search

+11 -14
View File
@@ -39,7 +39,6 @@ import noppes.npcs.roles.RoleTransporter;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.ScriptSound;
import noppes.npcs.scripted.event.DialogEvent;
import noppes.npcs.util.CustomNPCsScheduler;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
@@ -256,20 +255,18 @@ public class NoppesUtilServer {
setEditingNpc(player, npc);
sendExtraData(player, npc,gui, i, j, k);
CustomNPCsScheduler.runTack(() -> {
if(CustomNpcs.proxy.getServerGuiElement(gui.ordinal(), player, player.worldObj, i, j, k) != null){
player.openGui(CustomNpcs.instance, gui.ordinal(), player.worldObj, i, j, k);
return;
}
else{
Server.sendDataChecked((EntityPlayerMP)player, EnumPacketClient.GUI, gui.ordinal(), i, j, k);
}
ArrayList<String> list = getScrollData(player, gui, npc);
if(list == null || list.isEmpty())
return;
if(CustomNpcs.proxy.getServerGuiElement(gui.ordinal(), player, player.worldObj, i, j, k) != null){
player.openGui(CustomNpcs.instance, gui.ordinal(), player.worldObj, i, j, k);
return;
}
else{
Server.sendDataChecked((EntityPlayerMP)player, EnumPacketClient.GUI, gui.ordinal(), i, j, k);
}
ArrayList<String> list = getScrollData(player, gui, npc);
if(list == null || list.isEmpty())
return;
Server.sendData((EntityPlayerMP)player, EnumPacketClient.SCROLL_LIST, list);
}, 100);
Server.sendData((EntityPlayerMP)player, EnumPacketClient.SCROLL_LIST, list);
}
public static void sendOpenGuiNoDelay(final EntityPlayer player,