Record Class FollowingEntityKVector
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.kvector.FollowingEntityKVector
- All Implemented Interfaces:
KVector, CustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, KVector>, CustomRegistryValue<net.minecraft.network.RegistryFriendlyByteBuf, KVector>, RefOptimizer<KVector>, WithKey, WithRef<KVector>
public record FollowingEntityKVector(Ref<EntityFilter> entity, PositionType positionType)
extends Record
implements KVector
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, KVector> Fields inherited from interface KVector
CODEC, DATA_TYPE, ERROR_NOT_A_NUMBER, ERROR_NOT_A_VECTOR, ONE, ORIGIN, PREFIX_LIST, REGISTRY, SOURCE, STREAM_CODEC, TARGET, ZEROFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionFollowingEntityKVector(Ref<EntityFilter> entity, PositionType positionType) Creates an instance of aFollowingEntityKVectorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionentity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.phys.Vec3get(KNumberContext ctx) final inthashCode()Returns a hash code value for this object.Returns the value of thepositionTyperecord component.final StringtoString()Returns a string representation of this record class.DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, KVector> type()Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface KVector
getRegistry, isStringLiteral, offset, scaleMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
FollowingEntityKVector
Creates an instance of aFollowingEntityKVectorrecord class.- Parameters:
entity- the value for theentityrecord componentpositionType- the value for thepositionTyperecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, KVector>
-
get
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
positionType
Returns the value of thepositionTyperecord component.- Returns:
- the value of the
positionTyperecord component
-