Record Class BiomeChange3D

java.lang.Object
java.lang.Record
com.sk89q.worldedit.history.change.BiomeChange3D
Record Components:
position - the position
previous - the previous biome
current - the current biome
All Implemented Interfaces:
Change

public record BiomeChange3D(BlockVector3 position, BiomeType previous, BiomeType current) extends Record implements Change
Represents a biome change that may be undone or replayed.

This biome change does not have an Extent assigned to it because one will be taken from the passed UndoContext. If the context does not have an extent (it is null), cryptic errors may occur.

  • Constructor Details

  • Method Details

    • getPosition

      @Deprecated(forRemoval=true) public BlockVector3 getPosition()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the position.
      Returns:
      the position
    • getPrevious

      @Deprecated(forRemoval=true) public BiomeType getPrevious()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the previous biome.
      Returns:
      the previous biome
    • getCurrent

      @Deprecated(forRemoval=true) public BiomeType getCurrent()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the current biome.
      Returns:
      the current biome
    • undo

      public void undo(UndoContext context) throws WorldEditException
      Description copied from interface: Change
      Perform an undo. This method may not be available if the object was returned from ChangeSet.forwardIterator().
      Specified by:
      undo in interface Change
      Parameters:
      context - a context for undo
      Throws:
      WorldEditException - on an error
    • redo

      public void redo(UndoContext context) throws WorldEditException
      Description copied from interface: Change
      Perform an redo. This method may not be available if the object was returned from ChangeSet.backwardIterator() ()}.
      Specified by:
      redo in interface Change
      Parameters:
      context - a context for redo
      Throws:
      WorldEditException - on an error
    • 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.
    • position

      public BlockVector3 position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • previous

      public BiomeType previous()
      Returns the value of the previous record component.
      Returns:
      the value of the previous record component
    • current

      public BiomeType current()
      Returns the value of the current record component.
      Returns:
      the value of the current record component