Skip to content

Commit

Permalink
better handling of missing or incorrect phos dependency
Browse files Browse the repository at this point in the history
related #20
  • Loading branch information
RogueLogix committed Jan 7, 2024
1 parent 51a392a commit 1643fc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.roguelogix.phosphophyllite.registry.ClientOnly;
import net.roguelogix.phosphophyllite.registry.OnModLoad;
import net.roguelogix.phosphophyllite.util.NonnullDefault;
import net.roguelogix.quartz.QuartzConfig;

@ClientOnly
@NonnullDefault
Expand All @@ -25,7 +26,7 @@ public static void initQuartz() {
}

static {
if (!DatagenModLoader.isRunningDataGen()) {
if (!DatagenModLoader.isRunningDataGen() && QuartzConfig.INIT_COMPLETED) {
try {
QuartzCore.init();
} catch (Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.roguelogix.quartz.internal.mixin;

import net.minecraft.client.ResourceLoadStateTracker;
import net.roguelogix.quartz.QuartzConfig;
import net.roguelogix.quartz.internal.QuartzCore;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -11,6 +12,8 @@
public class ResourceReloadListener {
@Inject(method = "finishReload", at = @At("HEAD"))
public void finishReload(CallbackInfo ci) {
QuartzCore.resourcesReloaded();
if (QuartzConfig.INIT_COMPLETED){
QuartzCore.resourcesReloaded();
}
}
}

0 comments on commit 1643fc0

Please sign in to comment.