Skip to content

Commit

Permalink
Fixed Block and Item mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
UselessBullets committed Jun 21, 2024
1 parent af2218c commit 41b35c7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
org.gradle.jvmargs=-Xmx2G

# BTA
bta_version=7.2-pre1

bta_version=7.2-pre2
# Loader & Mod Menu
loader_version=0.15.6-babric.6-bta
mod_menu_version=2.0.6
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/turniplabs/halplibe/HalpLibe.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ public class HalpLibe implements ModInitializer, PreLaunchEntrypoint{
exportRecipes = CONFIG.getBoolean("Debug.ExportRecipes");
compatibilityMode = CONFIG.getBoolean("Experimental.CompatibilityMode");

// Initialize Block and Item static fields
try {
Class.forName("net.minecraft.core.block.Block");
Class.forName("net.minecraft.core.item.Item");
} catch (ClassNotFoundException ignored) {
}
ModVersionHelper.initialize();
}
public static final AchievementPage VANILLA_ACHIEVEMENTS = new VanillaAchievementsPage();
Expand Down Expand Up @@ -95,7 +89,12 @@ public void onInitialize() {

@Override
public void onPreLaunch() {
// Initializes halp statics first
// Initialize Block and Item static fields
try {
Class.forName("net.minecraft.core.block.Block");
Class.forName("net.minecraft.core.item.Item");
} catch (ClassNotFoundException ignored) {
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void addInfo(String key, int id, Material material, CallbackInfo ci) {
throw new IllegalArgumentException("Slot " + id + " is already occupied by " + blocksList[id].getKey() + " when adding " + key);
}

@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/achievement/stat/StatList;onBlockInit()V"))
@Redirect(method = "initializeBlocks()V", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/achievement/stat/StatList;onBlockInit()V"))
private static void delayInit() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ private static void captureHighest(CallbackInfo ci) {
ItemHelper.Registry.highestVanilla = highestItemId;
ci.cancel();
}
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/achievement/stat/StatList;onItemInit()V"))

@Redirect(method = "initializeItems()V", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/achievement/stat/StatList;onItemInit()V"))
private static void delayInit() {
}
}

0 comments on commit 41b35c7

Please sign in to comment.