Files
SkillEngine/src/main/java/net/fretux/skillengine/skilltree/SkillNode.java
T

116 lines
2.8 KiB
Java

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<ResourceLocation> links;
private final List<ResourceLocation> tags;
private final ResourceLocation tree;
private final String category;
private final String layer;
private final ResourceLocation icons;
private final Map<String, Integer> prereqAttributes;
private final List<ResourceLocation> exclusiveWith;
public SkillNode(ResourceLocation id,
Component title,
Component description,
int cost,
float x, float y,
List<ResourceLocation> links,
List<ResourceLocation> tags,
ResourceLocation tree,
String category,
String layer,
ResourceLocation icons,
Map<String, Integer> prereqAttributes,
List<ResourceLocation> 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<ResourceLocation> getLinks() {
return links;
}
public List<ResourceLocation> 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<String, Integer> getPrereqAttributes() {
return prereqAttributes;
}
public List<ResourceLocation> getExclusiveWith() {
return exclusiveWith;
}
public boolean isRoot() {
return links.isEmpty();
}
}