package net.fretux.skillengine.skilltree; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import java.util.List; import java.util.Map; public class SkillNode { private final ResourceLocation id; private final Component title; private final Component description; private final int cost; private final float x; private final float y; private final List links; private final List tags; private final ResourceLocation tree; private final String category; private final String layer; private final ResourceLocation icons; private final Map prereqAttributes; private final List exclusiveWith; public SkillNode(ResourceLocation id, Component title, Component description, int cost, float x, float y, List links, List tags, ResourceLocation tree, String category, String layer, ResourceLocation icons, Map prereqAttributes, List exclusiveWith){ this.id = id; this.title = title; this.description = description; this.cost = cost; this.x = x; this.y = y; this.links = List.copyOf(links); this.tags = List.copyOf(tags); this.tree = tree; this.category = category; this.layer = layer; this.icons = icons; this.prereqAttributes = Map.copyOf(prereqAttributes); this.exclusiveWith = List.copyOf(exclusiveWith); } public ResourceLocation getId() { return id; } public Component getTitle() { return title; } public Component getDescription() { return description; } public int getCost() { return cost; } public float getX() { return x; } public float getY() { return y; } public List getLinks() { return links; } public List getTags() { return tags; } public ResourceLocation getTree() { return tree; } public String getCategory() { return category; } public String getLayer() { return layer; } public ResourceLocation getIcons() { return icons; } public Map getPrereqAttributes() { return prereqAttributes; } public List getExclusiveWith() { return exclusiveWith; } public boolean isRoot() { return links.isEmpty(); } }