Package org.spongepowered.api.block
Interface BlockSnapshot.Builder
-
- All Superinterfaces:
Buildable.Builder<BlockSnapshot>
,Builder<BlockSnapshot,BlockSnapshot.Builder>
,CopyableBuilder<BlockSnapshot,BlockSnapshot.Builder>
,DataBuilder<BlockSnapshot>
,DataHolderBuilder<BlockSnapshot,BlockSnapshot.Builder>
,DataHolderBuilder.Immutable<BlockSnapshot,BlockSnapshot.Builder>
,ResettableBuilder<BlockSnapshot,BlockSnapshot.Builder>
,SerializableDataHolderBuilder<BlockSnapshot,BlockSnapshot.Builder>
,SerializableDataHolderBuilder.Immutable<BlockSnapshot,BlockSnapshot.Builder>
- Enclosing interface:
- BlockSnapshot
public static interface BlockSnapshot.Builder extends SerializableDataHolderBuilder.Immutable<BlockSnapshot,BlockSnapshot.Builder>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderBuilder
DataHolderBuilder.Immutable<H extends DataHolder.Immutable<H>,B extends DataHolderBuilder.Immutable<H,B>>, DataHolderBuilder.Mutable<H extends DataHolder.Mutable,B extends DataHolderBuilder.Mutable<H,B>>
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolderBuilder
SerializableDataHolderBuilder.Immutable<H extends SerializableDataHolder.Immutable<H>,B extends SerializableDataHolderBuilder.Immutable<H,B>>, SerializableDataHolderBuilder.Mutable<H extends SerializableDataHolder.Mutable,B extends SerializableDataHolderBuilder.Mutable<H,B>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockSnapshot.Builder
blockState(BlockState blockState)
Sets theBlockState
for thisBlockSnapshot
.BlockSnapshot.Builder
creator(UUID uuid)
Sets theUUID
of the user who created thisBlockSnapshot
.BlockSnapshot.Builder
from(ServerLocation location)
Copies over block data from aServerLocation
.BlockSnapshot.Builder
notifier(UUID uuid)
Sets theUUID
of the user who last notified thisBlockSnapshot
.BlockSnapshot.Builder
position(Vector3i position)
Sets the coordinates of thisBlockSnapshot
from aVector3i
.BlockSnapshot.Builder
world(ServerWorldProperties worldProperties)
Sets theServerWorldProperties
for thisBlockSnapshot
.-
Methods inherited from interface net.kyori.adventure.util.Buildable.Builder
build
-
Methods inherited from interface org.spongepowered.api.data.persistence.DataBuilder
build
-
-
-
-
Method Detail
-
world
BlockSnapshot.Builder world(ServerWorldProperties worldProperties)
Sets theServerWorldProperties
for thisBlockSnapshot
.This is used to grab the
UUID
of the World for this snapshot.- Parameters:
worldProperties
- The WorldProperties- Returns:
- This builder, for chaining
-
blockState
BlockSnapshot.Builder blockState(BlockState blockState)
Sets theBlockState
for thisBlockSnapshot
.This method should be called before calling
DataHolderBuilder.add(Value)
or any variant thereof.- Parameters:
blockState
- The BlockState- Returns:
- This builder, for chaining
-
position
BlockSnapshot.Builder position(Vector3i position)
Sets the coordinates of thisBlockSnapshot
from aVector3i
.- Parameters:
position
- The Vector3i representing the coordinates- Returns:
- This builder, for chaining
-
from
BlockSnapshot.Builder from(ServerLocation location)
Copies over block data from aServerLocation
.- Parameters:
location
- The Location to copy from- Returns:
- This builder, for chaining
-
creator
BlockSnapshot.Builder creator(UUID uuid)
Sets theUUID
of the user who created thisBlockSnapshot
.- Parameters:
uuid
- TheUUID
of the creator- Returns:
- This builder, for chaining
-
notifier
BlockSnapshot.Builder notifier(UUID uuid)
Sets theUUID
of the user who last notified thisBlockSnapshot
.- Parameters:
uuid
- TheUUID
of the notifier- Returns:
- This builder, for chaining
-
-