Initial commit

This commit is contained in:
2025-11-24 23:10:25 +01:00
commit 6f06da5f31
41 changed files with 3443 additions and 0 deletions
@@ -0,0 +1,17 @@
package net.fretux.skillengine.skilltree;
import net.fretux.skillengine.capability.PlayerSkillData;
import net.minecraft.resources.ResourceLocation;
public class SkillLogic {
public static boolean canUnlock(PlayerSkillData data, SkillNode node) {
if (data.isUnlocked(node.getId())) return false;
if (data.getSkillPoints() < node.getCost()) return false;
if (node.isRoot()) return true;
for (ResourceLocation neighborId : node.getLinks()) {
if (data.isUnlocked(neighborId)) return true;
}
return false;
}
}