Package net.minecraft.world.entity
Class EntityReference<StoredEntityType extends UniquelyIdentifyable>
java.lang.Object
net.minecraft.world.entity.EntityReference<StoredEntityType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<? extends EntityReference<?>> private com.mojang.datafixers.util.Either
<UUID, StoredEntityType> private static final StreamCodec
<io.netty.buffer.ByteBuf, ? extends EntityReference<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <Type extends UniquelyIdentifyable>
com.mojang.serialization.Codec<EntityReference<Type>> codec()
boolean
static <StoredEntityType extends UniquelyIdentifyable>
StoredEntityTypeget
(EntityReference<StoredEntityType> pReference, UUIDLookup<? super StoredEntityType> pUuidLookup, Class<StoredEntityType> pEntityClass) getEntity
(UUIDLookup<? super StoredEntityType> pUuidLookup, Class<StoredEntityType> pEntityClass) getUUID()
int
hashCode()
boolean
matches
(StoredEntityType pEntity) static <StoredEntityType extends UniquelyIdentifyable>
EntityReference<StoredEntityType> read
(ValueInput pInput, String pKey) static <StoredEntityType extends UniquelyIdentifyable>
EntityReference<StoredEntityType> readWithOldOwnerConversion
(ValueInput pInput, String pKey, Level pLevel) private StoredEntityType
resolve
(UniquelyIdentifyable pEntity, Class<StoredEntityType> pEntityClass) static void
store
(EntityReference<?> pKey, ValueOutput pOutput, String pUuid) void
store
(ValueOutput pOutput, String pKey) static <Type extends UniquelyIdentifyable>
StreamCodec<io.netty.buffer.ByteBuf, EntityReference<Type>>
-
Field Details
-
CODEC
-
STREAM_CODEC
-
entity
private com.mojang.datafixers.util.Either<UUID,StoredEntityType extends UniquelyIdentifyable> entity
-
-
Constructor Details
-
EntityReference
-
EntityReference
-
-
Method Details
-
codec
public static <Type extends UniquelyIdentifyable> com.mojang.serialization.Codec<EntityReference<Type>> codec() -
streamCodec
public static <Type extends UniquelyIdentifyable> StreamCodec<io.netty.buffer.ByteBuf,EntityReference<Type>> streamCodec() -
getUUID
-
getEntity
@Nullable public StoredEntityType getEntity(UUIDLookup<? super StoredEntityType> pUuidLookup, Class<StoredEntityType> pEntityClass) -
resolve
@Nullable private StoredEntityType resolve(@Nullable UniquelyIdentifyable pEntity, Class<StoredEntityType> pEntityClass) -
matches
-
store
-
store
-
get
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> StoredEntityType get(@Nullable EntityReference<StoredEntityType> pReference, UUIDLookup<? super StoredEntityType> pUuidLookup, Class<StoredEntityType> pEntityClass) -
read
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> EntityReference<StoredEntityType> read(ValueInput pInput, String pKey) -
readWithOldOwnerConversion
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> EntityReference<StoredEntityType> readWithOldOwnerConversion(ValueInput pInput, String pKey, Level pLevel) -
equals
-
hashCode
public int hashCode()
-