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()static <StoredEntityType extends UniquelyIdentifyable>
StoredEntityTypeget(EntityReference<StoredEntityType> reference, UUIDLookup<? super StoredEntityType> uuidLookup, Class<StoredEntityType> entityClass) getEntity(UUIDLookup<? super StoredEntityType> uuidLookup, Class<StoredEntityType> entityClass) getUUID()booleanmatches(StoredEntityType entity) static <StoredEntityType extends UniquelyIdentifyable>
EntityReference<StoredEntityType> read(CompoundTag tag, String key) static <StoredEntityType extends UniquelyIdentifyable>
EntityReference<StoredEntityType> readWithOldOwnerConversion(CompoundTag tag, String key, Level level) private StoredEntityTyperesolve(UniquelyIdentifyable entity, Class<StoredEntityType> entityClass) voidstore(CompoundTag tag, String key) 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> uuidLookup, Class<StoredEntityType> entityClass) -
resolve
@Nullable private StoredEntityType resolve(@Nullable UniquelyIdentifyable entity, Class<StoredEntityType> entityClass) -
matches
-
store
-
get
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> StoredEntityType get(@Nullable EntityReference<StoredEntityType> reference, UUIDLookup<? super StoredEntityType> uuidLookup, Class<StoredEntityType> entityClass) -
read
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> EntityReference<StoredEntityType> read(CompoundTag tag, String key) -
readWithOldOwnerConversion
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> EntityReference<StoredEntityType> readWithOldOwnerConversion(CompoundTag tag, String key, Level level)
-