Package at.petrak.hexcasting.common.msgs
Record Class MsgBlinkS2C
java.lang.Object
java.lang.Record
at.petrak.hexcasting.common.msgs.MsgBlinkS2C
- All Implemented Interfaces:
IMessage
public record MsgBlinkS2C(net.minecraft.world.phys.Vec3 addedPosition)
extends Record
implements IMessage
Sent server->client to synchronize OpBlink when the target is a player.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgBlinkS2C(net.minecraft.world.phys.Vec3 addedPosition) Creates an instance of aMsgBlinkS2Crecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3Returns the value of theaddedPositionrecord component.static MsgBlinkS2Cdeserialize(io.netty.buffer.ByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationForge auto-assigns incrementing integers, Fabric requires us to declare an ID These are sent using vanilla's custom plugin channel system and thus are written to every single packet.static voidhandle(MsgBlinkS2C self) final inthashCode()Returns a hash code value for this object.voidserialize(net.minecraft.network.FriendlyByteBuf buf) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
MsgBlinkS2C
public MsgBlinkS2C(net.minecraft.world.phys.Vec3 addedPosition) Creates an instance of aMsgBlinkS2Crecord class.- Parameters:
addedPosition- the value for theaddedPositionrecord component
-
-
Method Details
-
getFabricId
public net.minecraft.resources.ResourceLocation getFabricId()Description copied from interface:IMessageForge auto-assigns incrementing integers, Fabric requires us to declare an ID These are sent using vanilla's custom plugin channel system and thus are written to every single packet. So this ID tends to be more terse.- Specified by:
getFabricIdin interfaceIMessage
-
deserialize
-
serialize
public void serialize(net.minecraft.network.FriendlyByteBuf buf) -
handle
-
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). -
addedPosition
public net.minecraft.world.phys.Vec3 addedPosition()Returns the value of theaddedPositionrecord component.- Returns:
- the value of the
addedPositionrecord component
-