Package org.spongepowered.api.entity
Interface EntityArchetype
- 
- All Superinterfaces:
- Archetype<EntitySnapshot,Entity>,- CopyableDataHolder,- DataHolder,- DataHolder.Mutable,- DataSerializable,- SerializableDataHolder,- SerializableDataHolder.Mutable,- ValueContainer
 
 public interface EntityArchetype extends Archetype<EntitySnapshot,Entity> 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceEntityArchetype.BuilderA builder forEntityArchetypes.- 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderDataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
 - 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolderSerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static EntityArchetype.Builderbuilder()Creates aEntityArchetype.Builderto getEntityArchetypes.EntityArchetypecopy()Creates a clone copy of thisCopyableDataHolderas a newCopyableDataHoldersuch that all theValues are safely duplicated to the new instance.DataContainerentityData()Gets the rawEntitydata that would be applied to the generated entity.static EntityArchetypeof(EntityType<?> type)Creates a newEntityArchetypewith the specifiedEntityType.voidsetRawData(DataView container)Attempts to set all data of thisDataHolderaccording to theDataView's held information.EntityType<?>type()Gets theEntityTypeof the entity contained in this archetype.- 
Methods inherited from interface org.spongepowered.api.world.Archetypeapply, toSnapshot
 - 
Methods inherited from interface org.spongepowered.api.data.DataHolder.MutablecopyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
 - 
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializablecontentVersion, toContainer
 - 
Methods inherited from interface org.spongepowered.api.data.SerializableDataHoldervalidateRawData
 
- 
 
- 
- 
- 
Method Detail- 
builderstatic EntityArchetype.Builder builder() Creates aEntityArchetype.Builderto getEntityArchetypes.- Returns:
- The new builder
 
 - 
ofstatic EntityArchetype of(EntityType<?> type) Creates a newEntityArchetypewith the specifiedEntityType.- Parameters:
- type- Type of the entity
- Returns:
- An archetype of the given entity type
 
 - 
typeEntityType<?> type() Gets theEntityTypeof the entity contained in this archetype.- Returns:
- The entity type
 
 - 
entityDataDataContainer entityData() Gets the rawEntitydata 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.POSITIONare included as required bySchematics.- Returns:
- The copied container of the entity
 
 - 
setRawDatavoid setRawData(DataView container) throws InvalidDataException Description copied from interface:SerializableDataHolder.MutableAttempts to set all data of thisDataHolderaccording to theDataView's held information. Using this to modify known to beKeys provided dynamically throughDataProviders is unsupported. The format of theDataView's contained data is dependent on the type ofDataHolder.Mutablethis is. In some cases, the format is specified based on a more specific type, such as forEntityTypes, orItemTypes.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 to validate the provided view is not always possible due to the nature of the data being parsed by the implementation, and only understood by clients. Other cases where the data can be validated and the data is incompatible will end up throwing an InvalidDataException.- Specified by:
- setRawDatain interface- SerializableDataHolder.Mutable
- Parameters:
- container- A container containing all raw data to set on this data holder
- Throws:
- InvalidDataException- If the container is missing or has invalid data that this holder will refuse
 
 - 
copyEntityArchetype copy() Description copied from interface:CopyableDataHolderCreates a clone copy of thisCopyableDataHolderas a newCopyableDataHoldersuch that all theValues are safely duplicated to the new instance. It is not guaranteed that the returning container is of the same type as this container.- Specified by:
- copyin interface- Archetype<EntitySnapshot,Entity>
- Specified by:
- copyin interface- CopyableDataHolder
- Specified by:
- copyin interface- SerializableDataHolder
- Specified by:
- copyin interface- SerializableDataHolder.Mutable
- Returns:
- The new copy
 
 
- 
 
-