Record Class MsgBrainsweepAck
java.lang.Object
java.lang.Record
at.petrak.hexcasting.forge.network.MsgBrainsweepAck
- All Implemented Interfaces:
at.petrak.hexcasting.common.msgs.IMessage
public record MsgBrainsweepAck(int target)
extends Record
implements at.petrak.hexcasting.common.msgs.IMessage
Sent server->client to synchronize the status of a brainswept mob.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgBrainsweepAck(int target) Creates an instance of aMsgBrainsweepAckrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MsgBrainsweepAckdeserialize(io.netty.buffer.ByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationstatic voidhandle(MsgBrainsweepAck msg) final inthashCode()Returns a hash code value for this object.static MsgBrainsweepAckof(net.minecraft.world.entity.Entity target) voidserialize(net.minecraft.network.FriendlyByteBuf buf) inttarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface at.petrak.hexcasting.common.msgs.IMessage
toBuf
-
Field Details
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
MsgBrainsweepAck
public MsgBrainsweepAck(int target) Creates an instance of aMsgBrainsweepAckrecord class.- Parameters:
target- the value for thetargetrecord component
-
-
Method Details
-
getFabricId
public net.minecraft.resources.ResourceLocation getFabricId()- Specified by:
getFabricIdin interfaceat.petrak.hexcasting.common.msgs.IMessage
-
deserialize
-
serialize
public void serialize(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
serializein interfaceat.petrak.hexcasting.common.msgs.IMessage
-
of
-
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 '=='. -
target
public int target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-