Package at.petrak.hexcasting.common.msgs
Record Class MsgNewWallScrollS2C
java.lang.Object
java.lang.Record
at.petrak.hexcasting.common.msgs.MsgNewWallScrollS2C
- All Implemented Interfaces:
IMessage
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgNewWallScrollS2C(net.minecraft.network.protocol.game.ClientboundAddEntityPacket inner, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir, net.minecraft.world.item.ItemStack scrollItem, boolean showsStrokeOrder, int blockSize) Creates an instance of aMsgNewWallScrollS2Crecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theblockSizerecord component.static MsgNewWallScrollS2Cdeserialize(net.minecraft.network.FriendlyByteBuf buf) net.minecraft.core.Directiondir()Returns the value of thedirrecord 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 voidhandle(MsgNewWallScrollS2C self) final inthashCode()Returns a hash code value for this object.net.minecraft.network.protocol.game.ClientboundAddEntityPacketinner()Returns the value of theinnerrecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.net.minecraft.world.item.ItemStackReturns the value of thescrollItemrecord component.voidserialize(net.minecraft.network.FriendlyByteBuf buf) booleanReturns the value of theshowsStrokeOrderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
MsgNewWallScrollS2C
public MsgNewWallScrollS2C(net.minecraft.network.protocol.game.ClientboundAddEntityPacket inner, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir, net.minecraft.world.item.ItemStack scrollItem, boolean showsStrokeOrder, int blockSize) Creates an instance of aMsgNewWallScrollS2Crecord class.- Parameters:
inner- the value for theinnerrecord componentpos- the value for theposrecord componentdir- the value for thedirrecord componentscrollItem- the value for thescrollItemrecord componentshowsStrokeOrder- the value for theshowsStrokeOrderrecord componentblockSize- the value for theblockSizerecord 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
-
serialize
public void serialize(net.minecraft.network.FriendlyByteBuf buf) -
deserialize
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
inner
public net.minecraft.network.protocol.game.ClientboundAddEntityPacket inner()Returns the value of theinnerrecord component.- Returns:
- the value of the
innerrecord component
-
pos
public net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
dir
public net.minecraft.core.Direction dir()Returns the value of thedirrecord component.- Returns:
- the value of the
dirrecord component
-
scrollItem
public net.minecraft.world.item.ItemStack scrollItem()Returns the value of thescrollItemrecord component.- Returns:
- the value of the
scrollItemrecord component
-
showsStrokeOrder
public boolean showsStrokeOrder()Returns the value of theshowsStrokeOrderrecord component.- Returns:
- the value of the
showsStrokeOrderrecord component
-
blockSize
public int blockSize()Returns the value of theblockSizerecord component.- Returns:
- the value of the
blockSizerecord component
-