From 2af7f2c6ab500b314e76225fbf1af1155b4cd09c Mon Sep 17 00:00:00 2001 From: roadhog360 Date: Wed, 30 Oct 2024 01:40:36 -0500 Subject: [PATCH] Make concrete only track on tick start not tick end, oops Also some version checker cleanup --- .../etfuturum/core/handlers/ServerEventHandler.java | 8 +++----- .../ganymedes01/etfuturum/core/utils/VersionChecker.java | 9 +++------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/main/java/ganymedes01/etfuturum/core/handlers/ServerEventHandler.java b/src/main/java/ganymedes01/etfuturum/core/handlers/ServerEventHandler.java index 00577cd4..ea1a010d 100644 --- a/src/main/java/ganymedes01/etfuturum/core/handlers/ServerEventHandler.java +++ b/src/main/java/ganymedes01/etfuturum/core/handlers/ServerEventHandler.java @@ -1884,12 +1884,10 @@ public void onExplosion(ExplosionEvent kaboom) { @SubscribeEvent public void onPreWorldTick(TickEvent.WorldTickEvent e) { - - if (!e.world.isRemote && ModBlocks.CONCRETE_POWDER.isEnabled() && ModBlocks.CONCRETE.isEnabled()) { - doConcreteTracking(); - } - if (ConfigMixins.enableDoWeatherCycle && e.phase == TickEvent.Phase.START && e.side == Side.SERVER) { + if (ModBlocks.CONCRETE_POWDER.isEnabled() && ModBlocks.CONCRETE.isEnabled()) { + doConcreteTracking(); + } DoWeatherCycle.INSTANCE.isWorldTickInProgress = true; DoWeatherCycle.INSTANCE.isCommandInProgress = false; } diff --git a/src/main/java/ganymedes01/etfuturum/core/utils/VersionChecker.java b/src/main/java/ganymedes01/etfuturum/core/utils/VersionChecker.java index eccdd095..95be7657 100644 --- a/src/main/java/ganymedes01/etfuturum/core/utils/VersionChecker.java +++ b/src/main/java/ganymedes01/etfuturum/core/utils/VersionChecker.java @@ -82,7 +82,7 @@ public void run() { isLatestVersion = new ComparableVersion(Reference.VERSION_NUMBER).compareTo(new ComparableVersion(latestVersion)) >= 0; - if (!this.isLatestVersion() && !latestVersion.equals("") && !latestVersion.equals(null)) { + if (!this.isLatestVersion() && !latestVersion.isEmpty()) { Logger.info("This version of " + Reference.MOD_NAME + " (" + Reference.VERSION_NUMBER + ") differs from the latest version: " + latestVersion); } @@ -107,7 +107,7 @@ public String getLatestVersion() { public void onPlayerTickEvent(PlayerTickEvent event) { // Used to repeat the version check if ( - (latestVersion == null || latestVersion.equals("")) + (latestVersion == null || latestVersion.isEmpty()) && !warnaboutfailure // Skip the "run" if a failure was detected && !hasThreadStarted ) { @@ -135,10 +135,7 @@ public void onPlayerTickEvent(PlayerTickEvent event) { && !quitChecking ) { // Ordinary version checker - if ( - !latestVersion.equals(null) - && !latestVersion.equals("") - ) { + if (latestVersion != null && !latestVersion.isEmpty()) { quitChecking = true; if (!instance.isLatestVersion()) {