Record Class TrackPlacement.ConnectingFrom
java.lang.Object
java.lang.Record
com.simibubi.create.content.trains.track.TrackPlacement.ConnectingFrom
- Enclosing class:
TrackPlacement
public static record TrackPlacement.ConnectingFrom(net.minecraft.core.BlockPos pos, net.minecraft.world.phys.Vec3 axis, net.minecraft.world.phys.Vec3 normal, net.minecraft.world.phys.Vec3 end)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TrackPlacement.ConnectingFrom> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, TrackPlacement.ConnectingFrom> -
Constructor Summary
ConstructorsConstructorDescriptionConnectingFrom(net.minecraft.core.BlockPos pos, net.minecraft.world.phys.Vec3 axis, net.minecraft.world.phys.Vec3 normal, net.minecraft.world.phys.Vec3 end) Creates an instance of aConnectingFromrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3axis()Returns the value of theaxisrecord component.net.minecraft.world.phys.Vec3end()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3normal()Returns the value of thenormalrecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,TrackPlacement.ConnectingFrom> STREAM_CODEC
-
-
Constructor Details
-
ConnectingFrom
public ConnectingFrom(net.minecraft.core.BlockPos pos, net.minecraft.world.phys.Vec3 axis, net.minecraft.world.phys.Vec3 normal, net.minecraft.world.phys.Vec3 end) Creates an instance of aConnectingFromrecord class.- Parameters:
pos- the value for theposrecord componentaxis- the value for theaxisrecord componentnormal- the value for thenormalrecord componentend- the value for theendrecord component
-
-
Method Details
-
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). -
pos
public net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
axis
public net.minecraft.world.phys.Vec3 axis()Returns the value of theaxisrecord component.- Returns:
- the value of the
axisrecord component
-
normal
public net.minecraft.world.phys.Vec3 normal()Returns the value of thenormalrecord component.- Returns:
- the value of the
normalrecord component
-
end
public net.minecraft.world.phys.Vec3 end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-