Better Reorganization

This commit is contained in:
Kam committed 2025-02-27 15:54:42 -05:00
1 parent a328a635d7
commit da0489296e
38 files changed
+151 -144

No files matched your search

@@ -0,0 +1,50 @@
package kamkeel.npcs.controllers.data.profile;
import net.minecraft.nbt.NBTTagCompound;
public class ProfileInfoEntry {
private String label;
private String result;
private int labelColor;
private int resultColor;
public ProfileInfoEntry() {}
public ProfileInfoEntry(String label, int labelColor, String result, int resultColor) {
this.label = label;
this.result = result;
this.labelColor = labelColor;
this.resultColor = resultColor;
}
public ProfileInfoEntry(String label, int labelColor, int result, int resultColor) {
this(label, labelColor, String.valueOf(result), resultColor);
}
public ProfileInfoEntry(String label, String result) {
this(label, 0xFFFFFF, result, 0xFFFFFF);
}
public NBTTagCompound writeToNBT() {
NBTTagCompound tag = new NBTTagCompound();
tag.setString("Label", label);
tag.setInteger("LabelColor", labelColor);
tag.setString("Result", result);
tag.setInteger("ResultColor", resultColor);
return tag;
}
public static ProfileInfoEntry readFromNBT(NBTTagCompound tag) {
return new ProfileInfoEntry(
tag.getString("Label"),
tag.getInteger("LabelColor"),
tag.getString("Result"),
tag.getInteger("ResultColor")
);
}
public String getLabel() { return label; }
public String getResult() { return result; }
public int getLabelColor() { return labelColor; }
public int getResultColor() { return resultColor; }
}