mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-24 22:04:23 +00:00
Speedup - Inspired by the 1.12 version
This commit is contained in:
1 parent
6f874e5434
commit
449ce974f4
9 files changed
+463
-350
No files matched your search
@@ -58,8 +58,8 @@ public class MineTweakerImplementationAPI {
|
||||
private static final ListenPlayerLoggedIn LISTEN_LOGIN = new ListenPlayerLoggedIn();
|
||||
private static final ListenPlayerLoggedOut LISTEN_LOGOUT = new ListenPlayerLoggedOut();
|
||||
private static final ListenBlockInfo LISTEN_BLOCK_INFO = new ListenBlockInfo();
|
||||
private static final EventList<ReloadEvent> ONRELOAD = new EventList<ReloadEvent>();
|
||||
private static final EventList<ReloadEvent> ONPOSTRELOAD = new EventList<ReloadEvent>();
|
||||
private static final EventList<ReloadEvent> ONRELOAD = new EventList<>();
|
||||
private static final EventList<ReloadEvent> ONPOSTRELOAD = new EventList<>();
|
||||
|
||||
static {
|
||||
minetweakerCommands = new HashMap<String, MineTweakerCommand>();
|
||||
@@ -621,28 +621,7 @@ public class MineTweakerImplementationAPI {
|
||||
events.onPlayerLoggedIn(LISTEN_LOGIN);
|
||||
events.onPlayerLoggedOut(LISTEN_LOGOUT);
|
||||
}
|
||||
//
|
||||
// byte[] currentScript = MineTweakerAPI.tweaker.getScriptData();
|
||||
// if (currentScript != null) {
|
||||
// System.out.println("Already loaded a script before");
|
||||
//
|
||||
// // alread loaded a script
|
||||
// byte[] stagedScript = MineTweakerAPI.tweaker.getStagedScriptData();
|
||||
//
|
||||
// if (Arrays.equals(currentScript, stagedScript)) {
|
||||
// System.out.println("No reload needed");
|
||||
// return; // no reload necessary
|
||||
// }
|
||||
//
|
||||
// if (MineTweakerAPI.game.isLocked()) {
|
||||
// System.out.println("Reload blocked");
|
||||
// MineTweakerAPI.game.signalLockError();
|
||||
// return;
|
||||
// }
|
||||
// } else {
|
||||
// System.out.println("First time loading a script, go ahead");
|
||||
// }
|
||||
|
||||
|
||||
MineTweakerAPI.tweaker.rollback();
|
||||
if (MineTweakerAPI.server != null) {
|
||||
if (!MineTweakerAPI.server.isCommandAdded("minetweaker")) {
|
||||
|
||||
Reference in new issue
Block a user