Package net.minecraft.network.datasync
Class EntityDataManager
java.lang.Object
net.minecraft.network.datasync.EntityDataManager
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Entity
private boolean
private boolean
private final Map<Integer,
EntityDataManager.DataEntry<?>> private final ReadWriteLock
private static final org.apache.logging.log4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate <T> void
assignValue
(EntityDataManager.DataEntry<T> p_187224_1_, EntityDataManager.DataEntry<?> p_187224_2_) void
assignValues
(List<EntityDataManager.DataEntry<?>> p_187218_1_) void
private <T> void
createDataItem
(DataParameter<T> p_187222_1_, T p_187222_2_) <T> void
define
(DataParameter<T> p_187214_1_, T p_187214_2_) static <T> DataParameter<T>
defineId
(Class<? extends Entity> p_187226_0_, IDataSerializer<T> p_187226_1_) private static <T> EntityDataManager.DataEntry<T>
genericHelper
(PacketBuffer p_198167_0_, int p_198167_1_, IDataSerializer<T> p_198167_2_) <T> T
get
(DataParameter<T> p_187225_1_) getAll()
private <T> EntityDataManager.DataEntry<T>
getItem
(DataParameter<T> p_187219_1_) boolean
isDirty()
boolean
isEmpty()
static void
pack
(List<EntityDataManager.DataEntry<?>> p_187229_0_, PacketBuffer p_187229_1_) <T> void
set
(DataParameter<T> p_187227_1_, T p_187227_2_) static List<EntityDataManager.DataEntry<?>>
unpack
(PacketBuffer p_187215_0_) private static <T> void
writeDataItem
(PacketBuffer p_187220_0_, EntityDataManager.DataEntry<T> p_187220_1_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ENTITY_ID_POOL
-
entity
-
itemsById
-
lock
-
isEmpty
private boolean isEmpty -
isDirty
private boolean isDirty
-
-
Constructor Details
-
EntityDataManager
-
-
Method Details
-
defineId
public static <T> DataParameter<T> defineId(Class<? extends Entity> p_187226_0_, IDataSerializer<T> p_187226_1_) -
define
-
createDataItem
-
getItem
-
get
-
set
-
isDirty
public boolean isDirty() -
pack
public static void pack(List<EntityDataManager.DataEntry<?>> p_187229_0_, PacketBuffer p_187229_1_) throws IOException - Throws:
IOException
-
packDirty
-
getAll
-
writeDataItem
private static <T> void writeDataItem(PacketBuffer p_187220_0_, EntityDataManager.DataEntry<T> p_187220_1_) throws IOException - Throws:
IOException
-
unpack
@Nullable public static List<EntityDataManager.DataEntry<?>> unpack(PacketBuffer p_187215_0_) throws IOException - Throws:
IOException
-
genericHelper
private static <T> EntityDataManager.DataEntry<T> genericHelper(PacketBuffer p_198167_0_, int p_198167_1_, IDataSerializer<T> p_198167_2_) -
assignValues
-
assignValue
private <T> void assignValue(EntityDataManager.DataEntry<T> p_187224_1_, EntityDataManager.DataEntry<?> p_187224_2_) -
isEmpty
public boolean isEmpty() -
clearDirty
public void clearDirty()
-