Skip to content

Commit

Permalink
feat: Rename apoli:equal -> shappoli:equal backport
Browse files Browse the repository at this point in the history
Previous behavior would crash the game if apoli were to implement this condition
  • Loading branch information
shap-po committed Oct 2, 2024
1 parent 6034dfb commit 9ca253f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ public static void register() {
}

private static void register(ConditionFactory<Pair<Entity, Entity>> conditionFactory) {
// Register only if original condition is not already registered
if (!ApoliRegistries.BIENTITY_CONDITION.containsId(conditionFactory.getSerializerId())) {
Registry.register(ApoliRegistries.BIENTITY_CONDITION, conditionFactory.getSerializerId(), conditionFactory);
}
Registry.register(ApoliRegistries.BIENTITY_CONDITION, conditionFactory.getSerializerId(), conditionFactory);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.shap_po.shappoli.integration.backport.apoli.power.factory.condition.bientity;

import io.github.apace100.apoli.Apoli;
import com.github.shap_po.shappoli.Shappoli;
import io.github.apace100.apoli.power.factory.condition.ConditionFactory;
import io.github.apace100.calio.data.SerializableData;
import net.minecraft.entity.Entity;
Expand All @@ -18,7 +18,7 @@ public static boolean condition(SerializableData.Instance data, Pair<Entity, Ent

public static ConditionFactory<Pair<Entity, Entity>> getFactory() {
return new ConditionFactory<>(
Apoli.identifier("equal"),
Shappoli.identifier("equal"),
new SerializableData(),
EqualCondition::condition
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"condition": {
"type": "shappoli:shape_condition",
"bientity_condition": {
"type": "apoli:equal"
"type": "shappoli:equal"
}
},
"if_action": {
Expand Down

0 comments on commit 9ca253f

Please sign in to comment.