Record Class BiomeChange3D
java.lang.Object
java.lang.Record
com.sk89q.worldedit.history.change.BiomeChange3D
- Record Components:
position
- the positionprevious
- the previous biomecurrent
- 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 Summary
ConstructorDescriptionBiomeChange3D
(BlockVector3 position, BiomeType previous, BiomeType current) Create a new biome change. -
Method Summary
Modifier and TypeMethodDescriptioncurrent()
Returns the value of thecurrent
record component.final boolean
Indicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Useposition()
.Deprecated, for removal: This API element is subject to removal in a future version.Useprevious()
.final int
hashCode()
Returns a hash code value for this object.position()
Returns the value of theposition
record component.previous()
Returns the value of theprevious
record component.void
redo
(UndoContext context) Perform an redo.final String
toString()
Returns a string representation of this record class.void
undo
(UndoContext context) Perform an undo.
-
Constructor Details
-
BiomeChange3D
Create a new biome change.
-
-
Method Details
-
getPosition
Deprecated, for removal: This API element is subject to removal in a future version.Useposition()
.Get the position.- Returns:
- the position
-
getPrevious
Deprecated, for removal: This API element is subject to removal in a future version.Useprevious()
.Get the previous biome.- Returns:
- the previous biome
-
getCurrent
Deprecated, for removal: This API element is subject to removal in a future version.Usecurrent()
.Get the current biome.- Returns:
- the current biome
-
undo
Description copied from interface:Change
Perform an undo. This method may not be available if the object was returned fromChangeSet.forwardIterator()
.- Specified by:
undo
in interfaceChange
- Parameters:
context
- a context for undo- Throws:
WorldEditException
- on an error
-
redo
Description copied from interface:Change
Perform an redo. This method may not be available if the object was returned fromChangeSet.backwardIterator()
()}.- Specified by:
redo
in interfaceChange
- Parameters:
context
- a context for redo- Throws:
WorldEditException
- on an error
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
previous
Returns the value of theprevious
record component.- Returns:
- the value of the
previous
record component
-
current
Returns the value of thecurrent
record component.- Returns:
- the value of the
current
record component
-
current()
.