Package org.spongepowered.api.spawner
Interface Spawner
- All Superinterfaces:
- CopyableDataHolder,- DataHolder,- DataHolder.Mutable,- DataSerializable,- SerializableDataHolder,- SerializableDataHolder.Mutable,- ValueContainer
- All Known Subinterfaces:
- MobSpawner,- SpawnerMinecart
Represents an object which can spawn Entities.
 
In vanilla this can be a MobSpawner or SpawnerMinecart.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderDataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.MutableNested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolderSerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable
- 
Method SummaryModifier and TypeMethodDescriptiondefault Value.Mutable<Integer>Gets theValue.Mutablefor the limitation on the number of nearbyEntityinstances can exist near the owning spawner.default Value.Mutable<Ticks>Gets theValue.Mutablefor the maximum spawn delay required between attempts to spawn anEntity.default Value.Mutable<Ticks>Gets theValue.Mutablefor the minimum spawn delay required between attempts to spawn anEntity.Gets theWeightedCollectionValue.Mutableof all possibleEntityinstances that can be spawned by the spawner.default Value.Mutable<Ticks>Gets theValue.Mutablefor the remaining delay before a new attempt at spawning anEntityis made.default Value.Mutable<Double>Gets theValue.Mutablefor the minimum range aPlayermust remain in proximity of the spawner, such that if aPlayeris NOT within the provided range, no attempts to spawn anEntityis made.default Value.Mutable<Integer>Gets theValue.Mutablefor the count of successful spawns of allEntityinstances from the owning spawner.default Value.Mutable<Double>Gets theValue.Mutablefor the maximum range that anEntitycan be spawned from the spawner.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, undoMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializablecontentVersion, toContainerMethods inherited from interface org.spongepowered.api.data.SerializableDataHoldervalidateRawDataMethods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Mutablecopy, setRawData
- 
Method Details- 
remainingDelayGets theValue.Mutablefor the remaining delay before a new attempt at spawning anEntityis made.- Returns:
- The immutable bounded value for the remaining delay
 
- 
minimumSpawnDelayGets theValue.Mutablefor the minimum spawn delay required between attempts to spawn anEntity.- Returns:
- The bounded value of the minimum spawn delay
 
- 
maximumSpawnDelayGets theValue.Mutablefor the maximum spawn delay required between attempts to spawn anEntity.- Returns:
- The bounded value of the maximum spawn delay
 
- 
spawnCountGets theValue.Mutablefor the count of successful spawns of allEntityinstances from the owning spawner. This count is simply a total count, there is no limitation on how many attempts are made to spawn anEntity.- Returns:
- The immutable bounded value
 
- 
maximumNearbyEntitiesGets theValue.Mutablefor the limitation on the number of nearbyEntityinstances can exist near the owning spawner. The limitation is that if there are moreEntityinstances than the provided value, no attempts to spawn a newEntitywill be made.- Returns:
- The bounded value of the maximum supported nearby entities
 
- 
requiredPlayerRangeGets theValue.Mutablefor the minimum range aPlayermust remain in proximity of the spawner, such that if aPlayeris NOT within the provided range, no attempts to spawn anEntityis made.- Returns:
- The value of the required player range to spawn entities
 
- 
spawnRangeGets theValue.Mutablefor the maximum range that anEntitycan be spawned from the spawner.- Returns:
- The immutable value of the maximum spawn range an entity can be spawned
 
- 
nextEntityToSpawnGets theValue.Mutablefor the overriddenWeightedSerializableObject<EntitySnapshot>to spawn next. If possible, the next entity to spawn may be chosen from the already providedpossibleEntitiesToSpawn().- Returns:
- The next possible entity to spawn
 
- 
possibleEntitiesToSpawnGets theWeightedCollectionValue.Mutableof all possibleEntityinstances that can be spawned by the spawner. As they are allWeightedSerializableObject<EntitySnapshot>instances, their weight is defined as aRandomto determine the nextEntitythat will be spawned, unless overriden bynextEntityToSpawn().- Returns:
- The immutable weighted entity collection value of entities
 
 
-