Package org.spongepowered.api.entity
Interface EntitySnapshot.Builder
-
- All Superinterfaces:
AbstractBuilder<EntitySnapshot>
,Buildable.Builder<EntitySnapshot>
,Builder<EntitySnapshot,EntitySnapshot.Builder>
,CopyableBuilder<EntitySnapshot,EntitySnapshot.Builder>
,DataBuilder<EntitySnapshot>
,DataHolderBuilder<EntitySnapshot,EntitySnapshot.Builder>
,DataHolderBuilder.Immutable<EntitySnapshot,EntitySnapshot.Builder>
,ResettableBuilder<EntitySnapshot,EntitySnapshot.Builder>
- Enclosing interface:
- EntitySnapshot
public static interface EntitySnapshot.Builder extends DataHolderBuilder.Immutable<EntitySnapshot,EntitySnapshot.Builder>, DataBuilder<EntitySnapshot>
AnDataHolderBuilder.Immutable
for buildingEntitySnapshot
s. The requirements
-
-
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>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description EntitySnapshot.Builder
from(Entity entity)
Copies over data from anEntity
.EntitySnapshot.Builder
position(Vector3d position)
Sets the coordinates of thisEntitySnapshot
from aVector3i
.default EntitySnapshot.Builder
type(java.util.function.Supplier<? extends EntityType<?>> entityType)
Sets theEntityType
for thisEntitySnapshot
.EntitySnapshot.Builder
type(EntityType<?> entityType)
Sets theEntityType
for thisEntitySnapshot
.EntitySnapshot.Builder
world(ServerWorldProperties worldProperties)
Sets theWorldProperties
for thisEntitySnapshot
.-
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
EntitySnapshot.Builder world(ServerWorldProperties worldProperties)
Sets theWorldProperties
for thisEntitySnapshot
.This is used to grab the
UUID
of the World for this snapshot.- Parameters:
worldProperties
- The WorldProperties- Returns:
- This builder, for chaining
-
type
default EntitySnapshot.Builder type(java.util.function.Supplier<? extends EntityType<?>> entityType)
Sets theEntityType
for thisEntitySnapshot
.- Parameters:
entityType
- The EntityType- Returns:
- This builder, for chaining
-
type
EntitySnapshot.Builder type(EntityType<?> entityType)
Sets theEntityType
for thisEntitySnapshot
.- Parameters:
entityType
- The EntityType- Returns:
- This builder, for chaining
-
position
EntitySnapshot.Builder position(Vector3d position)
Sets the coordinates of thisEntitySnapshot
from aVector3i
.- Parameters:
position
- The Vector3i representing the coordinates- Returns:
- This builder, for chaining
-
from
EntitySnapshot.Builder from(Entity entity)
Copies over data from anEntity
.- Parameters:
entity
- The Entity- Returns:
- This builder, for chaining
-
-