Modifier and Type | Method and Description |
---|---|
DataTransactionResult |
copyFrom(int xTo,
int yTo,
int zTo,
DataHolder from)
Attempts to copy all the relevant data from the provided
DataHolder to the block at the provided coordinates. |
DataTransactionResult |
copyFrom(int xTo,
int yTo,
int zTo,
DataHolder from,
MergeFunction function)
Attempts to copy all
ImmutableValue s from the provided block to
provided block to the provided block coordinates. |
default DataTransactionResult |
copyFrom(int xTo,
int yTo,
int zTo,
int xFrom,
int yFrom,
int zFrom)
Attempts to copy all
ImmutableValue s from the provided block to
provided block to the provided block coordinates. |
DataTransactionResult |
copyFrom(int xTo,
int yTo,
int zTo,
int xFrom,
int yFrom,
int zFrom,
MergeFunction function)
Attempts to copy all
ImmutableValue s from the provided block to
provided block to the provided block coordinates. |
default DataTransactionResult |
copyFrom(com.flowpowered.math.vector.Vector3i to,
DataHolder from)
Attempts to copy all the relevant data from the provided
DataHolder to the block at the provided coordinates. |
default DataTransactionResult |
copyFrom(com.flowpowered.math.vector.Vector3i to,
DataHolder from,
MergeFunction function)
Attempts to copy all
ImmutableValue s from the provided block to
provided block to the provided block coordinates. |
default DataTransactionResult |
copyFrom(com.flowpowered.math.vector.Vector3i coordinatesTo,
com.flowpowered.math.vector.Vector3i coordinatesFrom)
Attempts to copy all the relevant data from the provided
DataHolder to the block at the provided coordinates. |
default DataTransactionResult |
copyFrom(com.flowpowered.math.vector.Vector3i coordinatesTo,
com.flowpowered.math.vector.Vector3i coordinatesFrom,
MergeFunction function)
Attempts to copy all
ImmutableValue s from the provided block to
provided block to the provided block coordinates. |
<T extends DataManipulator<?,?>> |
get(int x,
int y,
int z,
Class<T> manipulatorClass)
Gets an instance of the given data class for given block at the location.
|
<E> Optional<E> |
get(int x,
int y,
int z,
Key<? extends BaseValue<E>> key)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
default <T extends DataManipulator<?,?>> |
get(com.flowpowered.math.vector.Vector3i coordinates,
Class<T> manipulatorClass)
Gets an instance of the given data class for given block at the location.
|
default <E> Optional<E> |
get(com.flowpowered.math.vector.Vector3i coordinates,
Key<? extends BaseValue<E>> key)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
Set<Key<?>> |
getKeys(int x,
int y,
int z)
Gets an
ImmutableSet of Key s for the block at the given
location. |
default Set<Key<?>> |
getKeys(com.flowpowered.math.vector.Vector3i coordinates)
Gets an
ImmutableSet of Key s for the block at the given
location. |
Collection<DataManipulator<?,?>> |
getManipulators(int x,
int y,
int z)
Gets an copied collection of all known
DataManipulator s belonging
to the block at the given position. |
default Collection<DataManipulator<?,?>> |
getManipulators(com.flowpowered.math.vector.Vector3i coordinates)
Gets an copied collection of all known
DataManipulator s belonging
to the block at the given position. |
<T extends DataManipulator<?,?>> |
getOrCreate(int x,
int y,
int z,
Class<T> manipulatorClass)
Gets or creates a new
DataManipulator that can be accepted by the
block at the location. |
default <T extends DataManipulator<?,?>> |
getOrCreate(com.flowpowered.math.vector.Vector3i coordinates,
Class<T> manipulatorClass)
Gets or creates a new
DataManipulator that can be accepted by the
block at the location. |
default <E> E |
getOrElse(int x,
int y,
int z,
Key<? extends BaseValue<E>> key,
E defaultValue)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
default <E> E |
getOrElse(com.flowpowered.math.vector.Vector3i coordinates,
Key<? extends BaseValue<E>> key,
E defaultValue)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
default <E> E |
getOrNull(int x,
int y,
int z,
Key<? extends BaseValue<E>> key)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
default <E> E |
getOrNull(com.flowpowered.math.vector.Vector3i coordinates,
Key<? extends BaseValue<E>> key)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
<E,V extends BaseValue<E>> |
getValue(int x,
int y,
int z,
Key<V> key)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
default <E,V extends BaseValue<E>> |
getValue(com.flowpowered.math.vector.Vector3i coordinates,
Key<V> key)
Gets the value of data that is keyed to the provided
Key at the
give block location. |
Set<ImmutableValue<?>> |
getValues(int x,
int y,
int z)
Gets an
ImmutableSet of ImmutableValue s for the block at
the given location. |
default Set<ImmutableValue<?>> |
getValues(com.flowpowered.math.vector.Vector3i coordinates)
Gets an
ImmutableSet of ImmutableValue s for the block at
the given location. |
default <E> DataTransactionResult |
offer(int x,
int y,
int z,
BaseValue<E> value)
Offers the given
BaseValue to the block at the given position. |
default DataTransactionResult |
offer(int x,
int y,
int z,
DataManipulator<?,?> manipulator)
Offers the given
DataManipulator to the block at the given
position. |
DataTransactionResult |
offer(int x,
int y,
int z,
DataManipulator<?,?> manipulator,
MergeFunction function)
Offers the given
DataManipulator to the block at the given
position. |
default DataTransactionResult |
offer(int x,
int y,
int z,
Iterable<DataManipulator<?,?>> manipulators)
Offers the provided
DataManipulator s to the block at the given
position. |
<E> DataTransactionResult |
offer(int x,
int y,
int z,
Key<? extends BaseValue<E>> key,
E value)
Offers the given
E value that is keyed by the provided
Key to the block at the provided location. |
default <E> DataTransactionResult |
offer(com.flowpowered.math.vector.Vector3i coordinates,
BaseValue<E> value)
Offers the given
BaseValue to the block at the given position. |
default DataTransactionResult |
offer(com.flowpowered.math.vector.Vector3i coordinates,
DataManipulator<?,?> manipulator)
Offers the given
DataManipulator to the block at the given
position. |
default DataTransactionResult |
offer(com.flowpowered.math.vector.Vector3i coordinates,
DataManipulator<?,?> manipulator,
MergeFunction function)
Offers the given
DataManipulator to the block at the given
position. |
default DataTransactionResult |
offer(com.flowpowered.math.vector.Vector3i coordinates,
Iterable<DataManipulator<?,?>> manipulators)
Offers the provided
DataManipulator s to the block at the given
position. |
default DataTransactionResult |
offer(com.flowpowered.math.vector.Vector3i blockPosition,
Iterable<DataManipulator<?,?>> values,
MergeFunction function)
Offers the provided
DataManipulator s to the block at the given
position. |
default <E> DataTransactionResult |
offer(com.flowpowered.math.vector.Vector3i coordinates,
Key<? extends BaseValue<E>> key,
E value)
Offers the given
E value that is keyed by the provided
Key to the block at the provided location. |
DataTransactionResult |
remove(int x,
int y,
int z,
Class<? extends DataManipulator<?,?>> manipulatorClass)
Attempts to remove the given
DataManipulator represented by the
block at the given location if possible. |
DataTransactionResult |
remove(int x,
int y,
int z,
Key<?> key)
Attempts to remove the data associated with the provided
Key from
the block at the provided location. |
default DataTransactionResult |
remove(com.flowpowered.math.vector.Vector3i coordinates,
Class<? extends DataManipulator<?,?>> manipulatorClass)
Attempts to remove the given
DataManipulator represented by the
block at the given location if possible. |
default DataTransactionResult |
remove(com.flowpowered.math.vector.Vector3i coordinates,
Key<?> key)
Attempts to remove the data associated with the provided
Key from
the block at the provided location. |
void |
setRawData(int x,
int y,
int z,
DataView container)
Attempts to set all data of the block at the given position according to
the
DataContainer 's held information. |
default void |
setRawData(com.flowpowered.math.vector.Vector3i position,
DataView container)
Attempts to set all data of the block at the given position according to
the
DataContainer 's held information. |
default boolean |
supports(int x,
int y,
int z,
BaseValue<?> value)
Checks if the provided
BaseValue is supported by the block at the
provided location. |
boolean |
supports(int x,
int y,
int z,
Class<? extends DataManipulator<?,?>> manipulatorClass)
Checks if the given
DataManipulator class is able to represent
data within the block at the given position. |
default boolean |
supports(int x,
int y,
int z,
DataManipulator<?,?> manipulator)
Checks if the given
DataManipulator class is able to represent
data within the block at the given position. |
boolean |
supports(int x,
int y,
int z,
Key<?> key)
Checks if the provided
Key to the data is supported by the block
at the provided location. |
default boolean |
supports(com.flowpowered.math.vector.Vector3i coordinates,
BaseValue<?> value)
Checks if the provided
BaseValue is supported by the block at the
provided location. |
default boolean |
supports(com.flowpowered.math.vector.Vector3i coordinates,
Class<? extends DataManipulator<?,?>> manipulatorClass)
Checks if the given
DataManipulator class is able to represent
data within the block at the given position. |
default boolean |
supports(com.flowpowered.math.vector.Vector3i coordinates,
DataManipulator<?,?> manipulator)
Checks if the given
DataManipulator class is able to represent
data within the block at the given position. |
default boolean |
supports(com.flowpowered.math.vector.Vector3i coordinates,
Key<?> key)
Checks if the provided
Key to the data is supported by the block
at the provided location. |
default <E> DataTransactionResult |
transform(int x,
int y,
int z,
Key<? extends BaseValue<E>> key,
Function<E,E> function)
Applies a transformation on the pre-existing value of the data keyed by
the provided
Key and returns a DataTransactionResult of
said transformation. |
default <E> DataTransactionResult |
transform(com.flowpowered.math.vector.Vector3i coordinates,
Key<? extends BaseValue<E>> key,
Function<E,E> function)
Applies a transformation on the pre-existing value of the data keyed by
the provided
Key and returns a DataTransactionResult of
said transformation. |
DataTransactionResult |
undo(int x,
int y,
int z,
DataTransactionResult result)
Attempts to undo a
DataTransactionResult . |
default DataTransactionResult |
undo(com.flowpowered.math.vector.Vector3i coordinates,
DataTransactionResult result)
Attempts to undo a
DataTransactionResult . |
boolean |
validateRawData(int x,
int y,
int z,
DataView container)
Validates the container with known data required to set the raw data to
the block at the given position.
|
default boolean |
validateRawData(com.flowpowered.math.vector.Vector3i position,
DataView container)
Validates the container with known data required to set the raw data to
the block at the given position.
|
default <E> Optional<E> get(com.flowpowered.math.vector.Vector3i coordinates, Key<? extends BaseValue<E>> key)
Key
at the
give block location.E
- The type of element of datacoordinates
- The position of the blockkey
- The key to the data<E> Optional<E> get(int x, int y, int z, Key<? extends BaseValue<E>> key)
Key
at the
give block location.E
- The type of element of datax
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefault <T extends DataManipulator<?,?>> Optional<T> get(com.flowpowered.math.vector.Vector3i coordinates, Class<T> manipulatorClass)
If there is no pre-existing data that can be represented by the given
DataManipulator
class, Optional.empty()
is returned.
T
- The type of datacoordinates
- The position of the blockmanipulatorClass
- The data class<T extends DataManipulator<?,?>> Optional<T> get(int x, int y, int z, Class<T> manipulatorClass)
If there is no pre-existing data that can be represented by the given
DataManipulator
class, Optional.empty()
is returned.
T
- The type of datax
- The X positiony
- The Y positionz
- The Z positionmanipulatorClass
- The data classdefault <T extends DataManipulator<?,?>> Optional<T> getOrCreate(com.flowpowered.math.vector.Vector3i coordinates, Class<T> manipulatorClass)
DataManipulator
that can be accepted by the
block at the location. In the event that there is no data that can be
represented by the given DataManipulator
, a new
DataManipulator
object is created with default values.
In the event the DataManipulator
can not represent any data
pertaining to the block at the location, Optional.empty()
is
returned.
T
- The type of datacoordinates
- The position of the blockmanipulatorClass
- The data class<T extends DataManipulator<?,?>> Optional<T> getOrCreate(int x, int y, int z, Class<T> manipulatorClass)
DataManipulator
that can be accepted by the
block at the location. In the event that there is no data that can be
represented by the given DataManipulator
, a new
DataManipulator
object is created with default values.
In the event the DataManipulator
can not represent any data
pertaining to the block at the location, Optional.empty()
is
returned.
T
- The type of datax
- The X positiony
- The Y positionz
- The Z positionmanipulatorClass
- The data class@Nullable default <E> E getOrNull(com.flowpowered.math.vector.Vector3i coordinates, Key<? extends BaseValue<E>> key)
Key
at the
give block location. The data may not exist, or may not be compatible in
which case null
may be returned.E
- The type of element of datacoordinates
- The position of the blockkey
- The key to the data@Nullable default <E> E getOrNull(int x, int y, int z, Key<? extends BaseValue<E>> key)
Key
at the
give block location. The data may not exist, or may not be compatible in
which case null
may be returned.E
- The type of element of datax
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefault <E> E getOrElse(com.flowpowered.math.vector.Vector3i coordinates, Key<? extends BaseValue<E>> key, E defaultValue)
Key
at the
give block location. The data may not exist, or may not be compatible in
which case the default value may be returned.E
- The type of element of datacoordinates
- The position of the blockkey
- The key to the datadefaultValue
- The default value to be provideddefault <E> E getOrElse(int x, int y, int z, Key<? extends BaseValue<E>> key, E defaultValue)
Key
at the
give block location. The data may not exist, or may not be compatible in
which case the default value may be returned.E
- The type of element of datax
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefaultValue
- The default value to returndefault <E,V extends BaseValue<E>> Optional<V> getValue(com.flowpowered.math.vector.Vector3i coordinates, Key<V> key)
Key
at the
give block location. The data may not exist, or may not be compatible in
which case null
may be returned.E
- The type of element of dataV
- The type of valuecoordinates
- The position of the blockkey
- The key to the data<E,V extends BaseValue<E>> Optional<V> getValue(int x, int y, int z, Key<V> key)
Key
at the
give block location.E
- The type of element of dataV
- The type of valuex
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefault boolean supports(com.flowpowered.math.vector.Vector3i coordinates, Key<?> key)
Key
to the data is supported by the block
at the provided location.coordinates
- The position of the blockkey
- The Key to the value of databoolean supports(int x, int y, int z, Key<?> key)
Key
to the data is supported by the block
at the provided location.x
- The X coordinatey
- The Y coordinatez
- The Z coordinatekey
- The Key to the value of datadefault boolean supports(com.flowpowered.math.vector.Vector3i coordinates, BaseValue<?> value)
BaseValue
is supported by the block at the
provided location.coordinates
- The position of the blockvalue
- The value of datadefault boolean supports(int x, int y, int z, BaseValue<?> value)
BaseValue
is supported by the block at the
provided location.x
- The X coordinatey
- The Y coordinatez
- The Z coordinatevalue
- The value of datadefault boolean supports(com.flowpowered.math.vector.Vector3i coordinates, Class<? extends DataManipulator<?,?>> manipulatorClass)
DataManipulator
class is able to represent
data within the block at the given position.coordinates
- The position of the blockmanipulatorClass
- The data classDataManipulator
objectboolean supports(int x, int y, int z, Class<? extends DataManipulator<?,?>> manipulatorClass)
DataManipulator
class is able to represent
data within the block at the given position.x
- The X positiony
- The Y positionz
- The Z positionmanipulatorClass
- The data classDataManipulator
objectdefault boolean supports(com.flowpowered.math.vector.Vector3i coordinates, DataManipulator<?,?> manipulator)
DataManipulator
class is able to represent
data within the block at the given position.coordinates
- The position of the blockmanipulator
- The manipulatorDataManipulator
objectdefault boolean supports(int x, int y, int z, DataManipulator<?,?> manipulator)
DataManipulator
class is able to represent
data within the block at the given position.x
- The X positiony
- The Y positionz
- The Z positionmanipulator
- The manipulatorDataManipulator
objectdefault Set<Key<?>> getKeys(com.flowpowered.math.vector.Vector3i coordinates)
ImmutableSet
of Key
s for the block at the given
location.coordinates
- The position of the blockSet<Key<?>> getKeys(int x, int y, int z)
ImmutableSet
of Key
s for the block at the given
location.x
- The X positiony
- The Y positionz
- The Z positiondefault Set<ImmutableValue<?>> getValues(com.flowpowered.math.vector.Vector3i coordinates)
ImmutableSet
of ImmutableValue
s for the block at
the given location.coordinates
- The position of the blockSet<ImmutableValue<?>> getValues(int x, int y, int z)
ImmutableSet
of ImmutableValue
s for the block at
the given location.x
- The X positiony
- The Y positionz
- The Z positiondefault <E> DataTransactionResult transform(com.flowpowered.math.vector.Vector3i coordinates, Key<? extends BaseValue<E>> key, Function<E,E> function)
Key
and returns a DataTransactionResult
of
said transformation.E
- The type of datacoordinates
- The position of the blockkey
- The key to the datafunction
- The function applying the transformationdefault <E> DataTransactionResult transform(int x, int y, int z, Key<? extends BaseValue<E>> key, Function<E,E> function)
Key
and returns a DataTransactionResult
of
said transformation.E
- The type of datax
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datafunction
- The function applying the transformationdefault <E> DataTransactionResult offer(com.flowpowered.math.vector.Vector3i coordinates, Key<? extends BaseValue<E>> key, E value)
E
value that is keyed by the provided
Key
to the block at the provided location.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
E
- The type of data being offeredcoordinates
- The position of the blockkey
- The key for the datavalue
- The value to offer<E> DataTransactionResult offer(int x, int y, int z, Key<? extends BaseValue<E>> key, E value)
E
value that is keyed by the provided
Key
to the block at the provided location.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
E
- The type of data being offeredx
- The X positiony
- The Y positionz
- The Z positionkey
- The key for the datavalue
- The value to offerdefault <E> DataTransactionResult offer(com.flowpowered.math.vector.Vector3i coordinates, BaseValue<E> value)
BaseValue
to the block at the given position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
E
- The type of the element wrapped by the valuecoordinates
- The position of the blockvalue
- The value to offerdefault <E> DataTransactionResult offer(int x, int y, int z, BaseValue<E> value)
BaseValue
to the block at the given position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
E
- The type of the element wrapped by the valuex
- The X positiony
- The Y positionz
- The Z positionvalue
- The value to offerdefault DataTransactionResult offer(com.flowpowered.math.vector.Vector3i coordinates, DataManipulator<?,?> manipulator)
DataManipulator
to the block at the given
position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
coordinates
- The position of the blockmanipulator
- The manipulator data to offerdefault DataTransactionResult offer(int x, int y, int z, DataManipulator<?,?> manipulator)
DataManipulator
to the block at the given
position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
x
- The X positiony
- The Y positionz
- The Z positionmanipulator
- The manipulator data to offerdefault DataTransactionResult offer(com.flowpowered.math.vector.Vector3i coordinates, DataManipulator<?,?> manipulator, MergeFunction function)
DataManipulator
to the block at the given
position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
coordinates
- The position of the blockmanipulator
- The manipulator data to offerfunction
- The merge function to resolve conflictsDataTransactionResult offer(int x, int y, int z, DataManipulator<?,?> manipulator, MergeFunction function)
DataManipulator
to the block at the given
position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected and replaced
data.
x
- The X positiony
- The Y positionz
- The Z positionmanipulator
- The manipulator data to offerfunction
- The merge function to resolve conflictsdefault DataTransactionResult offer(com.flowpowered.math.vector.Vector3i coordinates, Iterable<DataManipulator<?,?>> manipulators)
DataManipulator
s to the block at the given
position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected, replaced, and
successfully offered data.
coordinates
- The position of the blockmanipulators
- The values to offerdefault DataTransactionResult offer(int x, int y, int z, Iterable<DataManipulator<?,?>> manipulators)
DataManipulator
s to the block at the given
position.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected, replaced, and
successfully offered data.
x
- The X positiony
- The Y positionz
- The Z positionmanipulators
- The values to offerdefault DataTransactionResult offer(com.flowpowered.math.vector.Vector3i blockPosition, Iterable<DataManipulator<?,?>> values, MergeFunction function)
DataManipulator
s to the block at the given
position. If there's any overlaps of data, the provided
MergeFunction
is used to delegate the merges. It is possible to
recycle MergeFunction
s provided that the MergeFunction
is
aware of being usable in multiple environments.
If any data is rejected or existing data is replaced, the
DataTransactionResult
will retain the rejected, replaced, and
successfully offered data.
blockPosition
- The block positionvalues
- The values to offerfunction
- The merge function to resolve conflictsdefault DataTransactionResult remove(com.flowpowered.math.vector.Vector3i coordinates, Class<? extends DataManipulator<?,?>> manipulatorClass)
DataManipulator
represented by the
block at the given location if possible.
Certain DataManipulator
s can not be removed due to certain
dependencies relying on the particular data to function.
coordinates
- The position of the blockmanipulatorClass
- The data classDataTransactionResult remove(int x, int y, int z, Class<? extends DataManipulator<?,?>> manipulatorClass)
DataManipulator
represented by the
block at the given location if possible.
Certain DataManipulator
s can not be removed due to certain
dependencies relying on the particular data to function.
x
- The X positiony
- The Y positionz
- The Z positionmanipulatorClass
- The data classdefault DataTransactionResult remove(com.flowpowered.math.vector.Vector3i coordinates, Key<?> key)
Key
from
the block at the provided location.coordinates
- The position of the blockkey
- The key to the data to removeDataTransactionResult remove(int x, int y, int z, Key<?> key)
Key
from
the block at the provided location.x
- The X positiony
- The Y positionz
- The Z positionkey
- The key of the data to removedefault DataTransactionResult undo(com.flowpowered.math.vector.Vector3i coordinates, DataTransactionResult result)
DataTransactionResult
. Specifically, all
ImmutableValue
s that were successfully added are removed, and all
replaced ImmutableValue
s are offered.coordinates
- The position of the blockresult
- The transaction result to undoDataTransactionResult undo(int x, int y, int z, DataTransactionResult result)
DataTransactionResult
. Specifically, all
ImmutableValue
s that were successfully added are removed, and all
replaced ImmutableValue
s are offered.x
- The X positiony
- The Y positionz
- The Z positionresult
- The transaction result to undodefault DataTransactionResult copyFrom(com.flowpowered.math.vector.Vector3i to, DataHolder from)
DataHolder
to the block at the provided coordinates.to
- The coordinates of the blockfrom
- The data holder to copy data fromDataTransactionResult copyFrom(int xTo, int yTo, int zTo, DataHolder from)
DataHolder
to the block at the provided coordinates.xTo
- The X posyTo
- The Y poszTo
- The Z posfrom
- The data holder to copy data fromdefault DataTransactionResult copyFrom(com.flowpowered.math.vector.Vector3i coordinatesTo, com.flowpowered.math.vector.Vector3i coordinatesFrom)
DataHolder
to the block at the provided coordinates.coordinatesTo
- The coordinates of the blockcoordinatesFrom
- The coordinates of the block to copy data fromdefault DataTransactionResult copyFrom(int xTo, int yTo, int zTo, int xFrom, int yFrom, int zFrom)
ImmutableValue
s from the provided block to
provided block to the provided block coordinates.xTo
- The X position of the block to copy data toyTo
- The Y position of the block to copy data tozTo
- The Z position of the block to copy data toxFrom
- The X position of the block to copy data fromyFrom
- The Y position of the block to copy data fromzFrom
- The Z position of the block to copy data fromdefault DataTransactionResult copyFrom(com.flowpowered.math.vector.Vector3i to, DataHolder from, MergeFunction function)
ImmutableValue
s from the provided block to
provided block to the provided block coordinates. Any conflicting data is
handled through the provided MergeFunction
.to
- The block coordinates to copy tofrom
- the data holder to copy data fromfunction
- The merge function to resolve conflictsDataTransactionResult copyFrom(int xTo, int yTo, int zTo, DataHolder from, MergeFunction function)
ImmutableValue
s from the provided block to
provided block to the provided block coordinates. Any conflicting data is
handled through the provided MergeFunction
.xTo
- The X pos of the block to copy data toyTo
- The Y pos of the block to copy data tozTo
- The Z pos of the block to copy data tofrom
- The data holder to copy data fromfunction
- The merge function to resolve conflictsdefault DataTransactionResult copyFrom(com.flowpowered.math.vector.Vector3i coordinatesTo, com.flowpowered.math.vector.Vector3i coordinatesFrom, MergeFunction function)
ImmutableValue
s from the provided block to
provided block to the provided block coordinates. Any conflicting data is
handled through the provided MergeFunction
.coordinatesTo
- The coordinates of the block copying data tocoordinatesFrom
- The coordinates of the block to copy data fromfunction
- The merge function to resolve conflictsDataTransactionResult copyFrom(int xTo, int yTo, int zTo, int xFrom, int yFrom, int zFrom, MergeFunction function)
ImmutableValue
s from the provided block to
provided block to the provided block coordinates. Any conflicting data is
handled through the provided MergeFunction
.xTo
- The X positionyTo
- The Y positionzTo
- The Z positionxFrom
- The X positionyFrom
- The Y positionzFrom
- The Z positionfunction
- The merge resolving functiondefault Collection<DataManipulator<?,?>> getManipulators(com.flowpowered.math.vector.Vector3i coordinates)
DataManipulator
s belonging
to the block at the given position. An individual DataManipulator
can be used for creating new data to replace on the block at the given
position.coordinates
- The position of the blockCollection<DataManipulator<?,?>> getManipulators(int x, int y, int z)
DataManipulator
s belonging
to the block at the given position. An individual DataManipulator
can be used for creating new data to replace on the block at the given
position.x
- The X positiony
- The Y positionz
- The Z positiondefault boolean validateRawData(com.flowpowered.math.vector.Vector3i position, DataView container)
false
is returned.
This validation should be checked prior to calling
setRawData(Vector3i, DataView)
to avoid exceptions.
position
- The position of the blockcontainer
- The raw data to validateboolean validateRawData(int x, int y, int z, DataView container)
false
is returned.
This validation should be checked prior to calling
setRawData(Vector3i, DataView)
to avoid exceptions.
x
- The X positiony
- The Y positionz
- The Z positioncontainer
- The raw data to validatedefault void setRawData(com.flowpowered.math.vector.Vector3i position, DataView container) throws InvalidDataException
DataContainer
's held information. Using this to modify known
DataManipulator
s is unsupported and if the data is invalid, an
InvalidDataException
is thrown.
This setter is used to provide setting custom data that is not
represented by the Data API, including forge mods and other unknown data.
Attempts at validating known DataManipulator
s contained in the
data container are made with the assumption that all necessary data
exists.
position
- The position of the blockcontainer
- A container containing all raw data to set on the block
at the given positionInvalidDataException
- If the container is missing or has invalid
data that this holder will refusevoid setRawData(int x, int y, int z, DataView container) throws InvalidDataException
DataContainer
's held information. Using this to modify known
DataManipulator
s is unsupported and if the data is invalid, an
InvalidDataException
is thrown.
This setter is used to provide setting custom data that is not
represented by the Data API, including forge mods and other unknown data.
Attempts at validating known DataManipulator
s contained in the
data container are made with the assumption that all necessary data
exists.
x
- The X positiony
- The Y positionz
- The Z positioncontainer
- A container containing all raw data to set on the block
at the given positionInvalidDataException
- If the container is missing or has invalid
data that this holder will refuse