Package noppes.npcs.api.handler.data
Interface ISlot
-
public interface ISlot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description net.minecraft.nbt.NBTTagCompoundgetComponentData(String key)Map<String,net.minecraft.nbt.NBTTagCompound>getComponents()intgetId()longgetLastLoaded()StringgetName()booleanisTemporary()voidsetComponentData(String key, net.minecraft.nbt.NBTTagCompound data)Sets the NBT data for a specific component key.voidsetLastLoaded(long time)voidsetName(String name)voidsetTemporary(boolean temporary)net.minecraft.nbt.NBTTagCompoundtoNBT()
-
-
-
Method Detail
-
getId
int getId()
- Returns:
- id of slot
-
getName
String getName()
- Returns:
- Name of Slot
-
setName
void setName(String name)
- Parameters:
name- - New name of slot
-
getLastLoaded
long getLastLoaded()
- Returns:
- Last time Slot was Saved
-
setLastLoaded
void setLastLoaded(long time)
- Parameters:
time- - Long time for when it was last saved
-
isTemporary
boolean isTemporary()
- Returns:
- if the slot is temporary
-
setTemporary
void setTemporary(boolean temporary)
- Parameters:
temporary- - Setting a slot to temporary won't save it to Profile
-
getComponents
Map<String,net.minecraft.nbt.NBTTagCompound> getComponents()
- Returns:
- A map of all the NBTs within a slot
-
setComponentData
void setComponentData(String key, net.minecraft.nbt.NBTTagCompound data)
Sets the NBT data for a specific component key.- Parameters:
key- the component key (e.g. "CNPC+", "DBC").data- the NBT data to store.
-
getComponentData
net.minecraft.nbt.NBTTagCompound getComponentData(String key)
- Parameters:
key- - The KEY of the NBT for the Slot: [CNPC+, DBC... etc]- Returns:
- NBT for that that key
-
toNBT
net.minecraft.nbt.NBTTagCompound toNBT()
- Returns:
- The full NBT of the Slot
-
-