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
ConstructorsModifierConstructorDescriptionprivateEntityReference(UUID pUuid) privateEntityReference(StoredEntityType pEntity) -
Method Summary
Modifier and TypeMethodDescriptionstatic <Type extends UniquelyIdentifyable>
com.mojang.serialization.Codec<EntityReference<Type>> codec()booleanstatic <StoredEntityType extends UniquelyIdentifyable>
StoredEntityTypeget(EntityReference<StoredEntityType> pReference, Level pLevel, Class<StoredEntityType> pEntityClass) static EntitygetEntity(EntityReference<Entity> pReference, Level pLevel) getEntity(UUIDLookup<? extends UniquelyIdentifyable> pUuidLookup, Class<StoredEntityType> pEntityClass) getEntity(Level pLevel, Class<StoredEntityType> pEntityClass) static LivingEntitygetLivingEntity(EntityReference<LivingEntity> pReference, Level pLevel) static PlayergetPlayer(EntityReference<Player> pReference, Level pLevel) getUUID()inthashCode()booleanmatches(StoredEntityType pEntity) static <T extends UniquelyIdentifyable>
EntityReference<T> static <T extends UniquelyIdentifyable>
EntityReference<T> of(T 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 StoredEntityTyperesolve(UniquelyIdentifyable pEntity, Class<StoredEntityType> pEntityClass) static voidstore(EntityReference<?> pKey, ValueOutput pOutput, String pUuid) voidstore(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() -
of
-
of
-
getUUID
-
getEntity
@Nullable public StoredEntityType getEntity(UUIDLookup<? extends UniquelyIdentifyable> pUuidLookup, Class<StoredEntityType> pEntityClass) -
getEntity
-
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, Level pLevel, Class<StoredEntityType> pEntityClass) -
getEntity
@Nullable public static Entity getEntity(@Nullable EntityReference<Entity> pReference, Level pLevel) -
getLivingEntity
@Nullable public static LivingEntity getLivingEntity(@Nullable EntityReference<LivingEntity> pReference, Level pLevel) -
getPlayer
@Nullable public static Player getPlayer(@Nullable EntityReference<Player> pReference, Level pLevel) -
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()
-