mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 14:39:43 +00:00
Revert Some Multithreading for Synchronization
This commit is contained in:
1 parent
892d11b89b
commit
204e7a9c15
6 files changed
+20
-31
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user