mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 20:07:32 +00:00
Tooltip Helper for RPG Items
This commit is contained in:
1 parent
50977543c0
commit
58cd2bc535
5 files changed
+178
-88
No files matched your search
@@ -10,6 +10,7 @@ import java.util.Map;
|
||||
|
||||
public class Magic implements IMagic {
|
||||
public String name = "";
|
||||
public String displayName = "";
|
||||
public int color = Integer.parseInt("FF00", 16);
|
||||
public int id = -1;
|
||||
|
||||
@@ -21,6 +22,7 @@ public class Magic implements IMagic {
|
||||
|
||||
public Magic(int id, String name, int color) {
|
||||
this.name = name;
|
||||
this.displayName = name;
|
||||
this.color = color;
|
||||
this.id = id;
|
||||
}
|
||||
@@ -32,6 +34,7 @@ public class Magic implements IMagic {
|
||||
|
||||
public void readNBT(NBTTagCompound compound) {
|
||||
name = compound.getString("Name");
|
||||
displayName = compound.getString("DisplayName");
|
||||
color = compound.getInteger("Color");
|
||||
id = compound.getInteger("Slot");
|
||||
// No longer reading index/priority here.
|
||||
@@ -55,6 +58,7 @@ public class Magic implements IMagic {
|
||||
public void writeNBT(NBTTagCompound compound) {
|
||||
compound.setInteger("Slot", id);
|
||||
compound.setString("Name", name);
|
||||
compound.setString("DisplayName", displayName);
|
||||
compound.setInteger("Color", color);
|
||||
// No longer writing index/priority here.
|
||||
if(iconItem != null) {
|
||||
@@ -96,6 +100,14 @@ public class Magic implements IMagic {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
MagicController.getInstance().saveMagic(this);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user