Record Class WWStoneChestLidPacket

java.lang.Object
java.lang.Record
net.frozenblock.wilderwild.networking.packet.WWStoneChestLidPacket
All Implemented Interfaces:
net.fabricmc.fabric.api.networking.v1.FabricPacket

public record WWStoneChestLidPacket(net.minecraft.core.BlockPos pos, float openProgress, float highestLidPoint, int cooldownTicks, int stillLidTicks, boolean closing) extends Record implements net.fabricmc.fabric.api.networking.v1.FabricPacket
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.fabricmc.fabric.api.networking.v1.PacketType<WWStoneChestLidPacket>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    WWStoneChestLidPacket(net.minecraft.core.BlockPos pos, float openProgress, float highestLidPoint, int cooldownTicks, int stillLidTicks, boolean closing)
    Creates an instance of a WWStoneChestLidPacket record class.
    WWStoneChestLidPacket(@NotNull net.minecraft.network.FriendlyByteBuf buf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the closing record component.
    int
    Returns the value of the cooldownTicks record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.fabricmc.fabric.api.networking.v1.PacketType<?>
     
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the highestLidPoint record component.
    float
    Returns the value of the openProgress record component.
    net.minecraft.core.BlockPos
    pos()
    Returns the value of the pos record component.
    static void
    sendToAll(@NotNull StoneChestBlockEntity blockEntity)
     
    int
    Returns the value of the stillLidTicks record component.
    final String
    Returns a string representation of this record class.
    void
    write(@NotNull net.minecraft.network.FriendlyByteBuf buf)
     

    Methods inherited from class java.lang.Object

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

    • PACKET_TYPE

      public static final net.fabricmc.fabric.api.networking.v1.PacketType<WWStoneChestLidPacket> PACKET_TYPE
  • Constructor Details

    • WWStoneChestLidPacket

      public WWStoneChestLidPacket(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
    • WWStoneChestLidPacket

      public WWStoneChestLidPacket(net.minecraft.core.BlockPos pos, float openProgress, float highestLidPoint, int cooldownTicks, int stillLidTicks, boolean closing)
      Creates an instance of a WWStoneChestLidPacket record class.
      Parameters:
      pos - the value for the pos record component
      openProgress - the value for the openProgress record component
      highestLidPoint - the value for the highestLidPoint record component
      cooldownTicks - the value for the cooldownTicks record component
      stillLidTicks - the value for the stillLidTicks record component
      closing - the value for the closing record component
  • Method Details

    • sendToAll

      public static void sendToAll(@NotNull @NotNull StoneChestBlockEntity blockEntity)
    • write

      public void write(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      write in interface net.fabricmc.fabric.api.networking.v1.FabricPacket
    • getType

      public net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()
      Specified by:
      getType in interface net.fabricmc.fabric.api.networking.v1.FabricPacket
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • pos

      public net.minecraft.core.BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • openProgress

      public float openProgress()
      Returns the value of the openProgress record component.
      Returns:
      the value of the openProgress record component
    • highestLidPoint

      public float highestLidPoint()
      Returns the value of the highestLidPoint record component.
      Returns:
      the value of the highestLidPoint record component
    • cooldownTicks

      public int cooldownTicks()
      Returns the value of the cooldownTicks record component.
      Returns:
      the value of the cooldownTicks record component
    • stillLidTicks

      public int stillLidTicks()
      Returns the value of the stillLidTicks record component.
      Returns:
      the value of the stillLidTicks record component
    • closing

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