mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 20:52:36 +00:00
Rename Namespace to kamkeel.npcs
This commit is contained in:
1 parent
19c31b985d
commit
5d41f5b939
128 files changed
+406
-440
No files matched your search
@@ -0,0 +1,70 @@
|
||||
package kamkeel.npcs.controllers.data;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class Slot {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private long lastLoaded;
|
||||
private NBTTagCompound compound;
|
||||
|
||||
public Slot(int id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Slot(int id, String name, NBTTagCompound compound, long last) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.compound = compound;
|
||||
this.lastLoaded = last;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long getLastLoaded() {
|
||||
return lastLoaded;
|
||||
}
|
||||
|
||||
public void setLastLoaded(long lastLoaded) {
|
||||
this.lastLoaded = lastLoaded;
|
||||
}
|
||||
|
||||
public NBTTagCompound getCompound() {
|
||||
return compound;
|
||||
}
|
||||
|
||||
public void setCompound(NBTTagCompound compound) {
|
||||
this.compound = compound;
|
||||
}
|
||||
|
||||
public NBTTagCompound toNBT() {
|
||||
NBTTagCompound slotNBT = new NBTTagCompound();
|
||||
slotNBT.setString("Name", name);
|
||||
slotNBT.setLong("LastLoaded", lastLoaded);
|
||||
slotNBT.setTag("Data", compound);
|
||||
return slotNBT;
|
||||
}
|
||||
|
||||
public static Slot fromNBT(int id, NBTTagCompound slotNBT) {
|
||||
String name = slotNBT.getString("Name");
|
||||
long lastLoaded = slotNBT.getLong("LastLoaded");
|
||||
NBTTagCompound compound = slotNBT.getCompoundTag("Data");
|
||||
return new Slot(id, name, compound, lastLoaded);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user