Record Class ClientboundStartRidingPacket

java.lang.Object
java.lang.Record
tschipp.carryon.networking.clientbound.ClientboundStartRidingPacket
All Implemented Interfaces:
PacketBase

public record ClientboundStartRidingPacket(int iden, boolean ride) extends Record implements PacketBase
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClientboundStartRidingPacket(int iden, boolean ride)
    Creates an instance of a ClientboundStartRidingPacket record class.
    ClientboundStartRidingPacket(net.minecraft.network.FriendlyByteBuf buf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    void
    handle(net.minecraft.world.entity.player.Player player)
     
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceLocation
    id()
     
    int
    Returns the value of the iden record component.
    boolean
    Returns the value of the ride record component.
    final String
    Returns a string representation of this record class.
    void
    write(net.minecraft.network.FriendlyByteBuf buf)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClientboundStartRidingPacket

      public ClientboundStartRidingPacket(net.minecraft.network.FriendlyByteBuf buf)
    • ClientboundStartRidingPacket

      public ClientboundStartRidingPacket(int iden, boolean ride)
      Creates an instance of a ClientboundStartRidingPacket record class.
      Parameters:
      iden - the value for the iden record component
      ride - the value for the ride record component
  • Method Details

    • write

      public void write(net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      write in interface PacketBase
    • handle

      public void handle(net.minecraft.world.entity.player.Player player)
      Specified by:
      handle in interface PacketBase
    • id

      public net.minecraft.resources.ResourceLocation id()
      Specified by:
      id in interface PacketBase
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • iden

      public int iden()
      Returns the value of the iden record component.
      Returns:
      the value of the iden record component
    • ride

      public boolean ride()
      Returns the value of the ride record component.
      Returns:
      the value of the ride record component