public interface EntityArchetype extends Archetype<EntitySnapshot,Entity>
Modifier and Type | Interface and Description |
---|---|
static interface |
EntityArchetype.Builder
A builder for
EntityArchetype s. |
Modifier and Type | Method and Description |
---|---|
static EntityArchetype.Builder |
builder()
Creates a
EntityArchetype.Builder to get EntityArchetype s. |
EntityArchetype |
copy()
Creates a clone copy of this
ValueContainer as a new
ValueContainer such that all the BaseValue s are
safely duplicated to the new instance. |
DataContainer |
getEntityData()
Gets the raw
Entity data that would be applied to the generated
entity. |
EntityType |
getType()
Gets the
EntityType of the entity contained in this archetype. |
static EntityArchetype |
of(EntityType type)
Creates a new
EntityArchetype with the specified EntityType . |
void |
setRawData(DataView container)
Attempts to set all data of this
DataHolder according to the
DataContainer 's held information. |
apply, toSnapshot
validateRawData
getContentVersion, toContainer
getApplicableProperties, getProperty
static EntityArchetype.Builder builder()
EntityArchetype.Builder
to get EntityArchetype
s.static EntityArchetype of(EntityType type)
EntityArchetype
with the specified EntityType
.type
- Type of the entityEntityType getType()
EntityType
of the entity contained in this archetype.DataContainer getEntityData()
Entity
data that would be applied to the generated
entity. Note that this is a copied container.
Note: While normally, an archetype does not contain position information,
it is possible that Queries.POSITION
are included as required by
Schematic
s.
void setRawData(DataView container) throws InvalidDataException
DataHolder
DataHolder
according to the
DataContainer
's held information. Using this to modify known
DataManipulator
is unsupported and if the data is invalid, an
InvalidDataException
is thrown.
This setter is used to provide setting custom data that is not
represented by the Data API, including forge mods and other
unknown data. Attempts at validating known DataManipulator
s
contained in the data container are made with the assumption that all
necessary data exists.
setRawData
in interface DataHolder
container
- A container containing all raw data to set on this
data holderInvalidDataException
- If the container is missing or has invalid
data that this holder will refuseEntityArchetype copy()
ValueContainer
ValueContainer
as a new
ValueContainer
such that all the BaseValue
s are
safely duplicated to the new instance.copy
in interface ValueContainer<DataHolder>