Skip to content

Commit

Permalink
fix a fabric issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Jan 2, 2025
1 parent 51f8915 commit 75856e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main/java/net/frozenblock/trailiertales/TrailierTales.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,21 @@
import org.jetbrains.annotations.NotNull;

public class TrailierTales extends FrozenModInitializer {
private static boolean INITIALIZED = false;

public TrailierTales() {
super(TTConstants.MOD_ID);
}

@Override
public void onInitialize(String modId, ModContainer container) {
public static void init() {
if (INITIALIZED) return;
INITIALIZED = true;

if (FrozenBools.IS_DATAGEN) {
TTFeatureFlags.init();
FrozenFeatureFlags.rebuild();
}

TTDataFixer.applyDataFixes(container);
TTStructureTypes.init();
TTStructurePieceTypes.init();
TTMapDecorationTypes.init();
Expand All @@ -81,7 +83,12 @@ public void onInitialize(String modId, ModContainer container) {

TTModIntegrations.init();
TTCreativeInventorySorting.init();
}

@Override
public void onInitialize(String modId, ModContainer container) {
TTDataFixer.applyDataFixes(container);
init();
ResourceManagerHelper.registerBuiltinResourcePack(
TTConstants.id("trailier_main_menu"),
container, Component.literal("Trailier Main Menu"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class TrailierTalesClient implements ClientModInitializer {

@Override
public void onInitializeClient() {
TrailierTales.init();
SplashTextAPI.addSplashLocation(TTConstants.id("texts/splashes.txt"));
addPanorama("catacombs");

Expand Down

0 comments on commit 75856e6

Please sign in to comment.