Record Class IChunkExtent.IChunkEntity

java.lang.Object
java.lang.Record
com.fastasyncworldedit.core.queue.IChunkExtent.IChunkEntity
All Implemented Interfaces:
Entity, Locatable, Faceted
Enclosing interface:
IChunkExtent<T extends IChunk>

public static record IChunkExtent.IChunkEntity(Extent extent, Location location, UUID uuid, BaseEntity base) extends Record implements Entity
  • Constructor Details

    • IChunkEntity

      public IChunkEntity(Extent extent, Location location, UUID uuid, BaseEntity base)
      Creates an instance of a IChunkEntity record class.
      Parameters:
      extent - the value for the extent record component
      location - the value for the location record component
      uuid - the value for the uuid record component
      base - the value for the base record component
  • Method Details

    • getState

      public BaseEntity getState()
      Description copied from interface: Entity
      Get a copy of the entity's state.

      In some cases, this method may return null if a snapshot of the entity can't be created. It may not be possible, for example, to get a snapshot of a player.

      Specified by:
      getState in interface Entity
      Returns:
      the entity's state or null if one cannot be created
    • remove

      public boolean remove()
      Description copied from interface: Entity
      Remove this entity from it container.
      Specified by:
      remove in interface Entity
      Returns:
      true if removal was successful
    • getFacet

      public <T> T getFacet(Class<? extends T> cls)
      Description copied from interface: Faceted
      Get the facet corresponding to the given class or interface.
      Specified by:
      getFacet in interface Faceted
      Type Parameters:
      T - the type
      Parameters:
      cls - the class or interface
      Returns:
      an implementation of the facet or null if one is unavailable
    • getLocation

      public Location getLocation()
      Description copied from interface: Locatable
      Get the location of this actor.
      Specified by:
      getLocation in interface Locatable
      Returns:
      the location of the actor
    • setLocation

      public boolean setLocation(Location location)
      Description copied from interface: Locatable
      Sets the location of this actor.
      Specified by:
      setLocation in interface Locatable
      Parameters:
      location - the new location of the actor
      Returns:
      if the teleport succeeded
    • getExtent

      public Extent getExtent()
      Description copied from interface: Locatable
      Get the extent that this actor is in.
      Specified by:
      getExtent in interface Locatable
      Returns:
      the extent
    • 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.
    • extent

      public Extent extent()
      Returns the value of the extent record component.
      Returns:
      the value of the extent record component
    • location

      public Location location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • uuid

      public UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • base

      public BaseEntity base()
      Returns the value of the base record component.
      Returns:
      the value of the base record component