Skip to content

Commit

Permalink
feat: Add modify_trinkets alias for ModifyTrinketAction
Browse files Browse the repository at this point in the history
  • Loading branch information
shap-po committed Aug 29, 2024
1 parent b5fe571 commit f6c2c7d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.github.shap_po.shappoli.integration.trinkets.util.TrinketsUtil;
import io.github.apace100.apoli.data.ApoliDataTypes;
import io.github.apace100.apoli.power.factory.action.ActionFactory;
import io.github.apace100.apoli.power.factory.action.EntityActions;
import io.github.apace100.apoli.util.InventoryUtil;
import io.github.apace100.calio.data.SerializableData;
import io.github.apace100.calio.data.SerializableDataTypes;
Expand Down Expand Up @@ -55,7 +56,7 @@ public static void action(SerializableData.Instance data, Entity entity) {
}

public static ActionFactory<Entity> getFactory() {
return new ActionFactory<>(Shappoli.identifier("modify_trinket"),
ActionFactory<Entity> factory = new ActionFactory<>(Shappoli.identifier("modify_trinket"),
new SerializableData()
.add("slot", ShappoliTrinketsDataTypes.TRINKET_SLOT, null)
.add("slots", ShappoliTrinketsDataTypes.TRINKET_SLOTS, null)
Expand All @@ -67,5 +68,8 @@ public static ActionFactory<Entity> getFactory() {
,
ModifyTrinketAction::action
);

EntityActions.ALIASES.addPathAlias("modify_trinkets", factory.getSerializerId().getPath());
return factory;
}
}

0 comments on commit f6c2c7d

Please sign in to comment.