extend ability system to support dynamic slot counts, add skill tree validation, new prerequisites API, and extended mod commands

This commit is contained in:
2026-05-25 12:43:13 +02:00
parent 77fbada438
commit 7f5830d409
8 changed files with 56 additions and 22 deletions
@@ -42,10 +42,11 @@ public class ServerboundUnlockNodePacket {
if (unlockPlan != null) {
for (SkillNode plannedNode : unlockPlan) {
data.unlockNode(plannedNode);
if (plannedNode.getCost() > 0) {
int cost = Math.max(0, plannedNode.getCost());
if (cost > 0) {
MinecraftForge.EVENT_BUS.post(new SkillPointsChangedEvent(
player,
plannedNode.getCost(),
cost,
SkillPointsChangedEvent.Reason.SPENT,
plannedNode.getId()
));