Skip to content

Commit

Permalink
Implement new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdElAziz333 committed Jun 14, 2023
1 parent 6a6facc commit 35ba554
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 272 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 7 additions & 4 deletions src/main/java/com/abdelaziz/canary/mixin/CanaryMixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
return false;
}

//For now, disable calc.if_else.player_slot optimization when Inventorio is loaded, until i fix this issue
if (mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "calc.if_else.player_slot") && (FMLLoader.getLoadingModList().getModFileById("inventorio") != null)) {
//Fix: if Forge errors is not empty then disable shapes, math.sine_lut and alloc.blockstate optimizations. (Thanks for malte!)
if (mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "shapes") && !LoadingModList.get().getErrors().isEmpty()) {
return false;
}

//Fix: if Forge errors is not empty then disable shapes, math.sine_lut and alloc.blockstate optimizations. (Thanks for malte!)
if ((mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "shapes") && mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "math.sine_lut") && mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "alloc.blockstate")) && !LoadingModList.get().getErrors().isEmpty()) {
if (mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "math.sine_lut") && !LoadingModList.get().getErrors().isEmpty()) {
return false;
}

if (mixinClassName.startsWith(MIXIN_PACKAGE_ROOT + "alloc.blockstate") && !LoadingModList.get().getErrors().isEmpty()) {
return false;
}

Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/resources/canary.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"minVersion": "0.8.2",
"refmap": "canary.refmap.json",
"mixins": [
"ai.goals.AvoidEntityGoalMixin",
"ai.goals.LookAtPlayerGoalMixin",
"ai.pathing.BlockStateBaseMixin",
"ai.pathing.FlyNodeEvaluatorMixin",
"ai.pathing.PathNavigationRegionMixin",
Expand Down

0 comments on commit 35ba554

Please sign in to comment.