Skip to content

Commit

Permalink
Make concrete only track on tick start not tick end, oops
Browse files Browse the repository at this point in the history
Also some version checker cleanup
  • Loading branch information
Roadhog360 committed Oct 30, 2024
1 parent e63cb10 commit 2af7f2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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
) {
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 2af7f2c

Please sign in to comment.