Package net.minecraft.network.syncher
Class SynchedEntityData
java.lang.Object
net.minecraft.network.syncher.SynchedEntityData
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Entity
private static final int
private boolean
private boolean
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<SynchedEntityData.DataItem<?>>
private final ReadWriteLock
private static final org.slf4j.Logger
private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate <T> void
assignValue
(SynchedEntityData.DataItem<T> p_135376_, SynchedEntityData.DataItem<?> p_135377_) void
assignValues
(List<SynchedEntityData.DataItem<?>> p_135357_) void
private <T> void
createDataItem
(EntityDataAccessor<T> p_135386_, T p_135387_) <T> void
define
(EntityDataAccessor<T> p_135373_, T p_135374_) static <T> EntityDataAccessor<T>
defineId
(Class<? extends Entity> p_135354_, EntityDataSerializer<T> p_135355_) private static <T> SynchedEntityData.DataItem<T>
genericHelper
(FriendlyByteBuf p_135364_, int p_135365_, EntityDataSerializer<T> p_135366_) <T> T
get
(EntityDataAccessor<T> p_135371_) getAll()
private <T> SynchedEntityData.DataItem<T>
getItem
(EntityDataAccessor<T> p_135380_) boolean
isDirty()
boolean
isEmpty()
static void
pack
(List<SynchedEntityData.DataItem<?>> p_135359_, FriendlyByteBuf p_135360_) <T> void
set
(EntityDataAccessor<T> p_135382_, T p_135383_) static List<SynchedEntityData.DataItem<?>>
unpack
(FriendlyByteBuf p_135362_) private static <T> void
writeDataItem
(FriendlyByteBuf p_135368_, SynchedEntityData.DataItem<T> p_135369_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ENTITY_ID_POOL
-
EOF_MARKER
private static final int EOF_MARKER- See Also:
-
MAX_ID_VALUE
private static final int MAX_ID_VALUE- See Also:
-
entity
-
itemsById
-
lock
-
isEmpty
private boolean isEmpty -
isDirty
private boolean isDirty
-
-
Constructor Details
-
SynchedEntityData
-
-
Method Details
-
defineId
public static <T> EntityDataAccessor<T> defineId(Class<? extends Entity> p_135354_, EntityDataSerializer<T> p_135355_) -
define
-
createDataItem
-
getItem
-
get
-
set
-
isDirty
public boolean isDirty() -
pack
public static void pack(@Nullable List<SynchedEntityData.DataItem<?>> p_135359_, FriendlyByteBuf p_135360_) -
packDirty
-
getAll
-
writeDataItem
private static <T> void writeDataItem(FriendlyByteBuf p_135368_, SynchedEntityData.DataItem<T> p_135369_) -
unpack
-
genericHelper
private static <T> SynchedEntityData.DataItem<T> genericHelper(FriendlyByteBuf p_135364_, int p_135365_, EntityDataSerializer<T> p_135366_) -
assignValues
-
assignValue
private <T> void assignValue(SynchedEntityData.DataItem<T> p_135376_, SynchedEntityData.DataItem<?> p_135377_) -
isEmpty
public boolean isEmpty() -
clearDirty
public void clearDirty()
-