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 037bf1d commit 4e6157c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 270 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ private CanaryConfig() {
// Defines the default rules which can be configured by the user or other mods.
// You must manually add a rule for any new mixins not covered by an existing package rule.
this.addMixinRule("ai", true);
this.addMixinRule("ai.goals", true);
this.addMixinRule("ai.pathing", true);
this.addMixinRule("ai.poi", true);
this.addMixinRule("ai.poi.fast_portals", true);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 9 additions & 1 deletion src/main/java/com/abdelaziz/canary/mixin/CanaryMixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
}

//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 + "shapes") && !LoadingModList.get().getErrors().isEmpty()) {
return false;
}

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 4e6157c

Please sign in to comment.