Record Class LastPosDataComponent
java.lang.Object
java.lang.Record
in.northwestw.shortcircuit.registries.datacomponents.LastPosDataComponent
public record LastPosDataComponent(net.minecraft.resources.ResourceLocation rl, net.minecraft.world.phys.Vec3 pos)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionLastPosDataComponent(net.minecraft.resources.ResourceLocation rl, net.minecraft.world.phys.Vec3 pos) Creates an instance of aLastPosDataComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static net.minecraft.core.component.DataComponentType.Builder<LastPosDataComponent> getBuilder(net.minecraft.core.component.DataComponentType.Builder<LastPosDataComponent> builder) final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3pos()Returns the value of theposrecord component.net.minecraft.resources.ResourceLocationrl()Returns the value of therlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LastPosDataComponent
public LastPosDataComponent(net.minecraft.resources.ResourceLocation rl, net.minecraft.world.phys.Vec3 pos) Creates an instance of aLastPosDataComponentrecord class.- Parameters:
rl- the value for therlrecord componentpos- the value for theposrecord component
-
-
Method Details
-
getBuilder
public static net.minecraft.core.component.DataComponentType.Builder<LastPosDataComponent> getBuilder(net.minecraft.core.component.DataComponentType.Builder<LastPosDataComponent> builder) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
rl
public net.minecraft.resources.ResourceLocation rl()Returns the value of therlrecord component.- Returns:
- the value of the
rlrecord component
-
pos
public net.minecraft.world.phys.Vec3 pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-