Record Class FixedKVector
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.kvector.FixedKVector
- All Implemented Interfaces:
KVector, CustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, KVector>, CustomRegistryValue<net.minecraft.network.RegistryFriendlyByteBuf, KVector>, RefOptimizer<KVector>, WithKey, WithRef<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
ConstructorsConstructorDescriptionFixedKVector(@Nullable UnitType<net.minecraft.network.RegistryFriendlyByteBuf, KVector> typeOverride, net.minecraft.world.phys.Vec3 vec) Creates an instance of aFixedKVectorrecord class.FixedKVector(net.minecraft.world.phys.Vec3 vec) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.phys.Vec3get(KNumberContext ctx) final inthashCode()Returns a hash code value for this object.@NonNull StringtoString()Returns a string representation of this record class.CustomRegistryType<net.minecraft.network.RegistryFriendlyByteBuf, KVector> type()Returns the value of thetypeOverriderecord component.net.minecraft.world.phys.Vec3vec()Returns the value of thevecrecord component.Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface KVector
getRegistry, isStringLiteralMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
FixedKVector
public FixedKVector(net.minecraft.world.phys.Vec3 vec) -
FixedKVector
public FixedKVector(@Nullable @Nullable UnitType<net.minecraft.network.RegistryFriendlyByteBuf, KVector> typeOverride, net.minecraft.world.phys.Vec3 vec) Creates an instance of aFixedKVectorrecord class.- Parameters:
typeOverride- the value for thetypeOverriderecord componentvec- the value for thevecrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, KVector>
-
get
-
offset
-
scale
-
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). -
typeOverride
-
vec
public net.minecraft.world.phys.Vec3 vec()Returns the value of thevecrecord component.- Returns:
- the value of the
vecrecord component
-