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 EntitySnapshots. The
requirements-
Nested Class Summary
Nested classes/interfaces inherited from interface DataHolderBuilder
DataHolderBuilder.Immutable<H,B>, DataHolderBuilder.Mutable<H, B> -
Method Summary
Modifier and TypeMethodDescriptionCopies over data from anEntity.Sets the coordinates of thisEntitySnapshotfrom aVector3i.default EntitySnapshot.Buildertype(Supplier<? extends EntityType<?>> entityType) Sets theEntityTypefor thisEntitySnapshot.type(EntityType<?> entityType) Sets theEntityTypefor thisEntitySnapshot.world(ServerWorldProperties worldProperties) Sets theWorldPropertiesfor thisEntitySnapshot.Methods inherited from interface AbstractBuilder
buildMethods inherited from interface DataBuilder
build
-
Method Details
-
world
Sets theWorldPropertiesfor thisEntitySnapshot.This is used to grab the
UUIDof the World for this snapshot.- Parameters:
worldProperties- The WorldProperties- Returns:
- This builder, for chaining
-
type
Sets theEntityTypefor thisEntitySnapshot.- Parameters:
entityType- The EntityType- Returns:
- This builder, for chaining
-
type
Sets theEntityTypefor thisEntitySnapshot.- Parameters:
entityType- The EntityType- Returns:
- This builder, for chaining
-
position
Sets the coordinates of thisEntitySnapshotfrom 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
-