public class EntityDataManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EntityDataManager.DataEntry<T> |
Constructor and Description |
---|
EntityDataManager(Entity entityIn) |
Modifier and Type | Method and Description |
---|---|
static <T> DataParameter<T> |
createKey(java.lang.Class<? extends Entity> clazz,
DataSerializer<T> serializer) |
<T> T |
get(DataParameter<T> key) |
java.util.List<EntityDataManager.DataEntry<?>> |
getAll() |
java.util.List<EntityDataManager.DataEntry<?>> |
getDirty() |
boolean |
isDirty() |
boolean |
isEmpty() |
static java.util.List<EntityDataManager.DataEntry<?>> |
readEntries(PacketBuffer buf) |
<T> void |
register(DataParameter<T> key,
T value) |
<T> void |
set(DataParameter<T> key,
T value) |
void |
setClean() |
<T> void |
setDirty(DataParameter<T> key) |
protected <T> void |
setEntryValue(EntityDataManager.DataEntry<T> target,
EntityDataManager.DataEntry<?> source) |
void |
setEntryValues(java.util.List<EntityDataManager.DataEntry<?>> entriesIn) |
static void |
writeEntries(java.util.List<EntityDataManager.DataEntry<?>> entriesIn,
PacketBuffer buf) |
void |
writeEntries(PacketBuffer buf) |
public EntityDataManager(Entity entityIn)
public static <T> DataParameter<T> createKey(java.lang.Class<? extends Entity> clazz, DataSerializer<T> serializer)
public <T> void register(DataParameter<T> key, T value)
public <T> T get(DataParameter<T> key)
public <T> void set(DataParameter<T> key, T value)
public <T> void setDirty(DataParameter<T> key)
public boolean isDirty()
public static void writeEntries(java.util.List<EntityDataManager.DataEntry<?>> entriesIn, PacketBuffer buf) throws java.io.IOException
java.io.IOException
@Nullable public java.util.List<EntityDataManager.DataEntry<?>> getDirty()
public void writeEntries(PacketBuffer buf) throws java.io.IOException
java.io.IOException
@Nullable public java.util.List<EntityDataManager.DataEntry<?>> getAll()
@Nullable public static java.util.List<EntityDataManager.DataEntry<?>> readEntries(PacketBuffer buf) throws java.io.IOException
java.io.IOException
public void setEntryValues(java.util.List<EntityDataManager.DataEntry<?>> entriesIn)
protected <T> void setEntryValue(EntityDataManager.DataEntry<T> target, EntityDataManager.DataEntry<?> source)
public boolean isEmpty()
public void setClean()