Interface LocationBaseDataHolder
- All Known Subinterfaces:
Chunk<P>
,ClientWorld
,EnvironmentalVolume
,GenerationChunk
,GenerationRegion
,InteractableVolume
,LocationBaseDataHolder.Mutable
,PrimitiveGameVolume
,Region<R>
,Schematic
,ServerWorld
,TrackedVolume
,World<W,
,L> WorldChunk
,WorldLike<P>
public interface LocationBaseDataHolder
A type of
ServerLocation
based value store that can handle proxied data api
related queries for specific positions.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<E> Optional
<E> Gets the value of data that is keyed to the providedKey
at the give block location.default <E> Optional
<E> get
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> Optional
<E> Gets the value of data that is keyed to the providedKey
at the give block location.default <E> Optional
<E> get
(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location.default OptionalDouble
Gets the double value of data that is keyed to the providedKey
at the give block location.default OptionalDouble
getDouble
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<Double>>> key) Gets the double value of data that is keyed to the providedKey
at the give block location.default OptionalDouble
Gets the double value of data that is keyed to the providedKey
at the give block location.default OptionalDouble
getDouble
(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<Double>>> key) Gets the double value of data that is keyed to the providedKey
at the give block location.default OptionalInt
Gets the int value of data that is keyed to the providedKey
at the give block location.default OptionalInt
getInt
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<Integer>>> key) Gets the int value of data that is keyed to the providedKey
at the give block location.default OptionalInt
Gets the int value of data that is keyed to the providedKey
at the give block location.default OptionalInt
Gets the int value of data that is keyed to the providedKey
at the give block location.default OptionalLong
Gets the long value of data that is keyed to the providedKey
at the give block location.default OptionalLong
getLong
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<Long>>> key) Gets the long value of data that is keyed to the providedKey
at the give block location.default OptionalLong
Gets the long value of data that is keyed to the providedKey
at the give block location.default OptionalLong
Gets the long value of data that is keyed to the providedKey
at the give block location.Gets the value of data that is keyed to the providedKey
at the give block location.getValue
(int x, int y, int z, DefaultedRegistryReference<? extends Key<V>> key) Gets the value of data that is keyed to the providedKey
at the give block location.Gets the value of data that is keyed to the providedKey
at the give block location.Gets the value of data that is keyed to the providedKey
at the give block location.Set
<Value.Immutable<?>> getValues
(int x, int y, int z) Gets an immutableSet
ofValue.Immutable
s for the block at the given location.default Set
<Value.Immutable<?>> Gets an immutableSet
ofValue.Immutable
s for the block at the given location.keys
(int x, int y, int z) default <E> E
Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
orElse
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, E defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
orElse
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, Supplier<? extends E> defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
orElse
(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, E defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
orElse
(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, Supplier<? extends E> defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> @Nullable E
Gets the value of data that is keyed to the providedKey
at the give block location.default <E> @Nullable E
orNull
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> @Nullable E
Gets the value of data that is keyed to the providedKey
at the give block location.default <E> @Nullable E
orNull
(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location.default <E> E
default <E> E
require
(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) default <E> E
default <E> E
require
(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) default boolean
Checks if the providedKey
to the data is supported by the block at the provided location.boolean
Checks if the providedKey
to the data is supported by the block at the provided location.default boolean
Checks if the providedValue
is supported by the block at the provided location.default boolean
Checks if the providedKey
to the data is supported by the block at the provided location.default boolean
Checks if the providedKey
to the data is supported by the block at the provided location.default boolean
Checks if the providedValue
is supported by the block at the provided location.
-
Method Details
-
get
Gets the value of data that is keyed to the providedKey
at the give block location.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
get
default <E> Optional<E> get(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
get
Gets the value of data that is keyed to the providedKey
at the give block location.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
get
default <E> Optional<E> get(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
getInt
Gets the int value of data that is keyed to the providedKey
at the give block location.- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
getInt
default OptionalInt getInt(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<Integer>>> key) Gets the int value of data that is keyed to the providedKey
at the give block location.- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
getInt
Gets the int value of data that is keyed to the providedKey
at the give block location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
getInt
default OptionalInt getInt(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<Integer>>> key) Gets the int value of data that is keyed to the providedKey
at the give block location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
getDouble
Gets the double value of data that is keyed to the providedKey
at the give block location.- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
getDouble
default OptionalDouble getDouble(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<Double>>> key) Gets the double value of data that is keyed to the providedKey
at the give block location.- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
getDouble
Gets the double value of data that is keyed to the providedKey
at the give block location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
getDouble
default OptionalDouble getDouble(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<Double>>> key) Gets the double value of data that is keyed to the providedKey
at the give block location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
getLong
Gets the long value of data that is keyed to the providedKey
at the give block location.- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
getLong
default OptionalLong getLong(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<Long>>> key) Gets the long value of data that is keyed to the providedKey
at the give block location.- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data, if available
-
getLong
Gets the long value of data that is keyed to the providedKey
at the give block location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
getLong
default OptionalLong getLong(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<Long>>> key) Gets the long value of data that is keyed to the providedKey
at the give block location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data, if available
-
require
Attempts to get the underlying value backed by aValue
linked to the providedKey
.If the
Key
is not supported or available,NoSuchElementException
will be thrown.- Type Parameters:
E
- The type of value- Parameters:
position
- The position of the blockkey
- The key- Returns:
- The value
- Throws:
NoSuchElementException
- If the value is not supported or present
-
require
default <E> E require(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Attempts to get the underlying value backed by aValue
linked to the providedKey
.If the
Key
is not supported or available,NoSuchElementException
will be thrown.- Type Parameters:
E
- The type of value- Parameters:
position
- The position of the blockkey
- The key- Returns:
- The value
- Throws:
NoSuchElementException
- If the value is not supported or present
-
require
Attempts to get the underlying value backed by aValue
linked to the providedKey
.If the
Key
is not supported or available,NoSuchElementException
will be thrown.- Type Parameters:
E
- The type of value- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key- Returns:
- The value
- Throws:
NoSuchElementException
- If the value is not supported or present
-
require
default <E> E require(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Attempts to get the underlying value backed by aValue
linked to the providedKey
.If the
Key
is not supported or available,NoSuchElementException
will be thrown.- Type Parameters:
E
- The type of value- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key- Returns:
- The value
- Throws:
NoSuchElementException
- If the value is not supported or present
-
orNull
Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which casenull
may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data or null
-
orNull
default <E> @Nullable E orNull(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which casenull
may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The data or null
-
orNull
Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which casenull
may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data or null
-
orNull
default <E> @Nullable E orNull(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which casenull
may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The data or null
-
orElse
Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the datadefaultValue
- The default value to be provided- Returns:
- The data or null
-
orElse
default <E> E orElse(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, E defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the datadefaultValue
- The default value to be provided- Returns:
- The data or null
-
orElse
Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefaultValue
- The default value to return- Returns:
- The data or null
-
orElse
default <E> E orElse(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, E defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefaultValue
- The supplier of the default value to return- Returns:
- The data or null
-
orElse
default <E> E orElse(Vector3i position, Key<? extends Value<E>> key, Supplier<? extends E> defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the datadefaultValue
- The supplier of the default value to be provided- Returns:
- The data or null
-
orElse
default <E> E orElse(Vector3i position, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, Supplier<? extends E> defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
position
- The position of the blockkey
- The key to the datadefaultValue
- The supplier of the default value to be provided- Returns:
- The data or null
-
orElse
Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefaultValue
- The supplier of the default value to return- Returns:
- The data or null
-
orElse
default <E> E orElse(int x, int y, int z, DefaultedRegistryReference<? extends Key<? extends Value<E>>> key, Supplier<? extends E> defaultValue) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which case the default value may be returned.- Type Parameters:
E
- The type of element of data- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the datadefaultValue
- The supplier of the default value to return- Returns:
- The data or null
-
getValue
Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which casenull
may be returned.- Type Parameters:
E
- The type of element of dataV
- The type of value- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The base value, if available
-
getValue
default <E,V extends Value<E>> Optional<V> getValue(Vector3i position, Supplier<? extends Key<V>> key) Gets the value of data that is keyed to the providedKey
at the give block location. The data may not exist, or may not be compatible in which casenull
may be returned.- Type Parameters:
E
- The type of element of dataV
- The type of value- Parameters:
position
- The position of the blockkey
- The key to the data- Returns:
- The base value, if available
-
getValue
Gets the value of data that is keyed to the providedKey
at the give block location.- Type Parameters:
E
- The type of element of dataV
- The type of value- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The base value, if available
-
getValue
default <E,V extends Value<E>> Optional<V> getValue(int x, int y, int z, DefaultedRegistryReference<? extends Key<V>> key) Gets the value of data that is keyed to the providedKey
at the give block location.- Type Parameters:
E
- The type of element of dataV
- The type of value- Parameters:
x
- The X positiony
- The Y positionz
- The Z positionkey
- The key to the data- Returns:
- The base value, if available
-
supports
Checks if the providedKey
to the data is supported by the block at the provided location.- Parameters:
position
- The position of the blockkey
- The Key to the value of data- Returns:
- True if the block supports the data
-
supports
Checks if the providedKey
to the data is supported by the block at the provided location.- Parameters:
position
- The position of the blockkey
- The Key to the value of data- Returns:
- True if the block supports the data
-
supports
Checks if the providedKey
to the data is supported by the block at the provided location.- Parameters:
x
- The X coordinatey
- The Y coordinatez
- The Z coordinatekey
- The Key to the value of data- Returns:
- True if the block supports the data
-
supports
Checks if the providedKey
to the data is supported by the block at the provided location.- Parameters:
x
- The X coordinatey
- The Y coordinatez
- The Z coordinatekey
- The Key to the value of data- Returns:
- True if the block supports the data
-
supports
Checks if the providedValue
is supported by the block at the provided location.- Parameters:
position
- The position of the blockvalue
- The value of data- Returns:
- True if the block supports the data
-
supports
Checks if the providedValue
is supported by the block at the provided location.- Parameters:
x
- The X coordinatey
- The Y coordinatez
- The Z coordinatevalue
- The value of data- Returns:
- True if the block supports the data
-
keys
- Parameters:
position
- The position of the block- Returns:
- The immutable set of values for the block
-
keys
- Parameters:
x
- The X positiony
- The Y positionz
- The Z position- Returns:
- The immutable set of values for the block
-
getValues
Gets an immutableSet
ofValue.Immutable
s for the block at the given location.- Parameters:
position
- The position of the block- Returns:
- The immutable set of values for the block
-
getValues
Gets an immutableSet
ofValue.Immutable
s for the block at the given location.- Parameters:
x
- The X positiony
- The Y positionz
- The Z position- Returns:
- The immutable set of values for the block
-