Record Class ScreenEffectPacket

java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.sync.ScreenEffectPacket
All Implemented Interfaces:
AbstractPacket<ScreenEffectPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload

public record ScreenEffectPacket(String name, int introTicks, int holdTicks, int outroTicks, String lerpType) extends Record implements AbstractPacket<ScreenEffectPacket>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface AbstractPacket

    AbstractPacket.Definition<T>

    Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload

    net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScreenEffectPacket(String name, int introTicks, int holdTicks, int outroTicks, String lerpType)
    Creates an instance of a ScreenEffectPacket record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
     
    net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ScreenEffectPacket>
     
    net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ScreenEffectPacket>
     
    void
    handleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx)
     
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the holdTicks record component.
    int
    Returns the value of the introTicks record component.
    Returns the value of the lerpType record component.
    Returns the value of the name record component.
    int
    Returns the value of the outroTicks record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface AbstractPacket

    handleServer, type

    Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload

    toVanillaClientbound, toVanillaServerbound
  • Field Details

  • Constructor Details

    • ScreenEffectPacket

      public ScreenEffectPacket(String name, int introTicks, int holdTicks, int outroTicks, String lerpType)
      Creates an instance of a ScreenEffectPacket record class.
      Parameters:
      name - the value for the name record component
      introTicks - the value for the introTicks record component
      holdTicks - the value for the holdTicks record component
      outroTicks - the value for the outroTicks record component
      lerpType - the value for the lerpType record component
  • Method Details

    • getType

      public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ScreenEffectPacket> getType()
      Specified by:
      getType in interface AbstractPacket<ScreenEffectPacket>
    • getBoundTo

      public PacketBounds getBoundTo()
      Specified by:
      getBoundTo in interface AbstractPacket<ScreenEffectPacket>
    • getCodec

      public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ScreenEffectPacket> getCodec()
      Specified by:
      getCodec in interface AbstractPacket<ScreenEffectPacket>
    • handleClient

      public void handleClient(net.neoforged.neoforge.network.handling.IPayloadContext ctx)
      Specified by:
      handleClient in interface AbstractPacket<ScreenEffectPacket>
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • introTicks

      public int introTicks()
      Returns the value of the introTicks record component.
      Returns:
      the value of the introTicks record component
    • holdTicks

      public int holdTicks()
      Returns the value of the holdTicks record component.
      Returns:
      the value of the holdTicks record component
    • outroTicks

      public int outroTicks()
      Returns the value of the outroTicks record component.
      Returns:
      the value of the outroTicks record component
    • lerpType

      public String lerpType()
      Returns the value of the lerpType record component.
      Returns:
      the value of the lerpType record component