Skip to content

Commit

Permalink
Moved tectech block registration to pre-init (#3281)
Browse files Browse the repository at this point in the history
  • Loading branch information
RecursivePineapple authored Sep 25, 2024
1 parent 2bef993 commit 07b4531
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/bartworks/API/GlassTier.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static void addCustomGlass(String modname, String unlocalisedBlockName, i
}

public static void addCustomGlass(@NotNull Block block, int meta, int tier) {
Objects.requireNonNull(block, "Glass block cannot be null");
GlassTier.glasses.put(new BlockMetaPair(block, (byte) meta), tier);
}

Expand Down
12 changes: 8 additions & 4 deletions src/main/java/tectech/loader/MainLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,19 @@ public static void preLoad() {
} catch (Throwable t) {
LOGGER.error("Loading textures...", t);
}
}

public static void load() {
ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 6);
ProgressManager.ProgressBar progressBarPreload = ProgressManager.push("TecTech Preload", 1);

progressBarLoad.step("Regular Things");
progressBarPreload.step("Regular Things");
new ThingsLoader().run();
LOGGER.info("Block/Item Init Done");

ProgressManager.pop(progressBarPreload);
}

public static void load() {
ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 5);

progressBarLoad.step("Machine Things");
new MachineLoader().run();
LOGGER.info("Machine Init Done");
Expand Down

0 comments on commit 07b4531

Please sign in to comment.