Record Class AreaPacket

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

public record AreaPacket(AreaPacket.Action action, net.minecraft.resources.Identifier id, net.minecraft.world.phys.AABB bounds, net.minecraft.resources.Identifier dimensionId, Color color, List<net.minecraft.resources.Identifier> modules, net.minecraft.nbt.CompoundTag moduleData, net.minecraft.nbt.CompoundTag linkedAreas, AreaPacket.AreaType areaType) extends Record implements AbstractPacket<AreaPacket>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
    static enum 
     

    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
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket>
     
     
    static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<AreaPacket>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AreaPacket(AreaPacket.Action action, net.minecraft.resources.Identifier id, net.minecraft.world.phys.AABB bounds, net.minecraft.resources.Identifier dimensionId, Color color, List<net.minecraft.resources.Identifier> modules, net.minecraft.nbt.CompoundTag moduleData, net.minecraft.nbt.CompoundTag linkedAreas, AreaPacket.AreaType areaType)
    Creates an instance of a AreaPacket record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the action record component.
    Returns the value of the areaType record component.
    net.minecraft.world.phys.AABB
    Returns the value of the bounds record component.
    Returns the value of the color record component.
    static AreaPacket
    create(Area area)
     
    net.minecraft.resources.Identifier
    Returns the value of the dimensionId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
     
    net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket>
     
    net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<AreaPacket>
     
    final int
    Returns a hash code value for this object.
    net.minecraft.resources.Identifier
    id()
    Returns the value of the id record component.
    net.minecraft.nbt.CompoundTag
    Returns the value of the linkedAreas record component.
    net.minecraft.nbt.CompoundTag
    Returns the value of the moduleData record component.
    List<net.minecraft.resources.Identifier>
    Returns the value of the modules record component.
    static AreaPacket
    remove(net.minecraft.resources.Identifier areaId)
     
    static AreaPacket
     
    final String
    Returns a string representation of this record class.
    static AreaPacket
    update(Area area)
     

    Methods inherited from class Object

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

    Methods inherited from interface AbstractPacket

    handleClient, handleServer, type

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

    toVanillaClientbound, toVanillaServerbound
  • Field Details

    • TYPE

      public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<AreaPacket> TYPE
    • CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket> CODEC
    • DEFINITION

      public static final AbstractPacket.Definition<AreaPacket> DEFINITION
  • Constructor Details

    • AreaPacket

      public AreaPacket(AreaPacket.Action action, net.minecraft.resources.Identifier id, net.minecraft.world.phys.AABB bounds, net.minecraft.resources.Identifier dimensionId, Color color, List<net.minecraft.resources.Identifier> modules, net.minecraft.nbt.CompoundTag moduleData, net.minecraft.nbt.CompoundTag linkedAreas, AreaPacket.AreaType areaType)
      Creates an instance of a AreaPacket record class.
      Parameters:
      action - the value for the action record component
      id - the value for the id record component
      bounds - the value for the bounds record component
      dimensionId - the value for the dimensionId record component
      color - the value for the color record component
      modules - the value for the modules record component
      moduleData - the value for the moduleData record component
      linkedAreas - the value for the linkedAreas record component
      areaType - the value for the areaType record component
  • Method Details

    • create

      public static AreaPacket create(Area area)
    • update

      public static AreaPacket update(Area area)
    • remove

      public static AreaPacket remove(net.minecraft.resources.Identifier areaId)
    • requestSync

      public static AreaPacket requestSync()
    • getType

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

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

      public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AreaPacket> getCodec()
      Specified by:
      getCodec in interface AbstractPacket<AreaPacket>
    • 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 Objects::equals(Object,Object).
      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.
    • action

      public AreaPacket.Action action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • id

      public net.minecraft.resources.Identifier id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • bounds

      public net.minecraft.world.phys.AABB bounds()
      Returns the value of the bounds record component.
      Returns:
      the value of the bounds record component
    • dimensionId

      public net.minecraft.resources.Identifier dimensionId()
      Returns the value of the dimensionId record component.
      Returns:
      the value of the dimensionId record component
    • color

      public Color color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • modules

      public List<net.minecraft.resources.Identifier> modules()
      Returns the value of the modules record component.
      Returns:
      the value of the modules record component
    • moduleData

      public net.minecraft.nbt.CompoundTag moduleData()
      Returns the value of the moduleData record component.
      Returns:
      the value of the moduleData record component
    • linkedAreas

      public net.minecraft.nbt.CompoundTag linkedAreas()
      Returns the value of the linkedAreas record component.
      Returns:
      the value of the linkedAreas record component
    • areaType

      public AreaPacket.AreaType areaType()
      Returns the value of the areaType record component.
      Returns:
      the value of the areaType record component