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> p_393467_, UUIDLookup<? super StoredEntityType> p_393924_, Class<StoredEntityType> p_394473_) getEntity
(UUIDLookup<? super StoredEntityType> p_394375_, Class<StoredEntityType> p_394097_) getUUID()
boolean
matches
(StoredEntityType p_394272_) static <StoredEntityType extends UniquelyIdentifyable>
EntityReference<StoredEntityType> read
(CompoundTag p_393801_, String p_394012_) static <StoredEntityType extends UniquelyIdentifyable>
EntityReference<StoredEntityType> readWithOldOwnerConversion
(CompoundTag p_393884_, String p_394543_, Level p_393661_) private StoredEntityType
resolve
(UniquelyIdentifyable p_394069_, Class<StoredEntityType> p_394131_) void
store
(CompoundTag p_394136_, String p_393486_) 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> p_394375_, Class<StoredEntityType> p_394097_) -
resolve
@Nullable private StoredEntityType resolve(@Nullable UniquelyIdentifyable p_394069_, Class<StoredEntityType> p_394131_) -
matches
-
store
-
get
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> StoredEntityType get(@Nullable EntityReference<StoredEntityType> p_393467_, UUIDLookup<? super StoredEntityType> p_393924_, Class<StoredEntityType> p_394473_) -
read
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> EntityReference<StoredEntityType> read(CompoundTag p_393801_, String p_394012_) -
readWithOldOwnerConversion
@Nullable public static <StoredEntityType extends UniquelyIdentifyable> EntityReference<StoredEntityType> readWithOldOwnerConversion(CompoundTag p_393884_, String p_394543_, Level p_393661_)
-