mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 13:04:46 +00:00
Utilize a One Thread and Synchronized attribute to better control data integrity and prevent data loss
This commit is contained in:
1 parent
60dbcc7146
commit
ae1f33d327
6 files changed
+78
-45
No files matched your search
@@ -5,6 +5,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.client.gui.player.GuiFaction;
|
||||
import noppes.npcs.util.CustomNPCsScheduler;
|
||||
|
||||
public class InventoryTabFactions extends AbstractTab {
|
||||
public InventoryTabFactions() {
|
||||
@@ -15,19 +16,10 @@ public class InventoryTabFactions extends AbstractTab {
|
||||
|
||||
@Override
|
||||
public void onTabClicked() {
|
||||
Thread t = new Thread(){
|
||||
@Override
|
||||
public void run(){
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.displayGuiScreen(new GuiFaction());
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
CustomNPCsScheduler.runTack(() -> {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.displayGuiScreen(new GuiFaction());
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,9 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.play.client.C0DPacketCloseWindow;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.client.gui.player.GuiFaction;
|
||||
import noppes.npcs.client.gui.player.GuiQuestLog;
|
||||
import noppes.npcs.util.CustomNPCsScheduler;
|
||||
|
||||
public class InventoryTabQuests extends AbstractTab {
|
||||
public InventoryTabQuests() {
|
||||
@@ -17,19 +19,10 @@ public class InventoryTabQuests extends AbstractTab {
|
||||
|
||||
@Override
|
||||
public void onTabClicked() {
|
||||
Thread t = new Thread(){
|
||||
@Override
|
||||
public void run(){
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.displayGuiScreen(new GuiQuestLog(mc.thePlayer));
|
||||
}
|
||||
};
|
||||
t.start();
|
||||
CustomNPCsScheduler.runTack(() -> {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.displayGuiScreen(new GuiQuestLog(mc.thePlayer));
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user