Package org.spongepowered.api.entity
Interface EntitySnapshot.Builder
- All Superinterfaces:
AbstractBuilder<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>
An
DataHolderBuilder.Immutable
for building EntitySnapshot
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
Modifier and TypeMethodDescriptionCopies over data from anEntity
.Sets the coordinates of thisEntitySnapshot
from aVector3i
.default EntitySnapshot.Builder
type
(Supplier<? extends EntityType<?>> entityType) Sets theEntityType
for thisEntitySnapshot
.type
(EntityType<?> entityType) Sets theEntityType
for thisEntitySnapshot
.world
(ServerWorldProperties worldProperties) Sets theWorldProperties
for thisEntitySnapshot
.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
build
Methods inherited from interface org.spongepowered.api.data.persistence.DataBuilder
build
-
Method Details
-
world
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
Sets theEntityType
for thisEntitySnapshot
.- Parameters:
entityType
- The EntityType- Returns:
- This builder, for chaining
-
type
Sets theEntityType
for thisEntitySnapshot
.- Parameters:
entityType
- The EntityType- Returns:
- This builder, for chaining
-
position
Sets the coordinates of thisEntitySnapshot
from aVector3i
.- Parameters:
position
- The Vector3i representing the coordinates- Returns:
- This builder, for chaining
-
from
Copies over data from anEntity
.- Parameters:
entity
- The Entity- Returns:
- This builder, for chaining
-