Package at.petrak.hexcasting.common.msgs
Record Class MsgRecalcWallScrollDisplayS2C
java.lang.Object
java.lang.Record
at.petrak.hexcasting.common.msgs.MsgRecalcWallScrollDisplayS2C
- All Implemented Interfaces:
IMessage
public record MsgRecalcWallScrollDisplayS2C(int entityId, boolean showStrokeOrder)
extends Record
implements IMessage
Sent S->C to have a wall scroll recalculate its pattern, to get readability offset.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgRecalcWallScrollDisplayS2C(int entityId, boolean showStrokeOrder) Creates an instance of aMsgRecalcWallScrollDisplayS2Crecord class. -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(io.netty.buffer.ByteBuf buffer) intentityId()Returns the value of theentityIdrecord component.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 voidfinal inthashCode()Returns a hash code value for this object.voidserialize(net.minecraft.network.FriendlyByteBuf buf) booleanReturns the value of theshowStrokeOrderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
MsgRecalcWallScrollDisplayS2C
public MsgRecalcWallScrollDisplayS2C(int entityId, boolean showStrokeOrder) Creates an instance of aMsgRecalcWallScrollDisplayS2Crecord class.- Parameters:
entityId- the value for theentityIdrecord componentshowStrokeOrder- the value for theshowStrokeOrderrecord component
-
-
Method Details
-
deserialize
-
serialize
public void serialize(net.minecraft.network.FriendlyByteBuf buf) -
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
-
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 with '=='. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
showStrokeOrder
public boolean showStrokeOrder()Returns the value of theshowStrokeOrderrecord component.- Returns:
- the value of the
showStrokeOrderrecord component
-