Class endstone::CreatureSpawner¶
ClassList > endstone > CreatureSpawner
Represents a captured state of a creature spawner.
#include <endstone/block/creature_spawner.h>
Inherits the following classes: endstone::BlockState
Public Functions¶
| Type | Name |
|---|---|
| virtual int | getDelay () const = 0 Gets the delay until the spawner spawns the next batch of actors. |
| virtual int | getMaxNearbyEntities () const = 0 Gets the maximum number of similar actors allowed nearby before the spawner stops spawning. |
| virtual int | getMaxSpawnDelay () const = 0 Gets the maximum delay the spawner will wait between spawns. |
| virtual int | getMinSpawnDelay () const = 0 Gets the minimum delay the spawner will wait between spawns. |
| virtual int | getRequiredPlayerRange () const = 0 Gets how far away a player must be for the spawner to be active. |
| virtual int | getSpawnCount () const = 0 Gets how many actors the spawner attempts to spawn at a time. |
| virtual int | getSpawnRange () const = 0 Gets the radius around the spawner in which actors are spawned. |
| virtual const ActorType & | getSpawnedType () const = 0 Gets the type of actor this spawner will spawn. |
| virtual void | setDelay (int delay) = 0 Sets the delay until the spawner spawns the next batch of actors. |
| virtual void | setMaxNearbyEntities (int count) = 0 Sets the maximum number of similar actors allowed nearby before the spawner stops spawning. |
| virtual void | setMaxSpawnDelay (int delay) = 0 Sets the maximum delay the spawner will wait between spawns. |
| virtual void | setMinSpawnDelay (int delay) = 0 Sets the minimum delay the spawner will wait between spawns. |
| virtual void | setRequiredPlayerRange (int range) = 0 Sets how far away a player must be for the spawner to be active. |
| virtual void | setSpawnCount (int count) = 0 Sets how many actors the spawner attempts to spawn at a time. |
| virtual void | setSpawnRange (int range) = 0 Sets the radius around the spawner in which actors are spawned. |
| virtual void | setSpawnedType (ActorTypeId type) = 0 Sets the type of actor this spawner will spawn. |
Public Functions inherited from endstone::BlockState¶
| Type | Name |
|---|---|
| virtual std::unique_ptr< Block > | getBlock () const = 0 Gets the block represented by this block state. |
| virtual std::unique_ptr< BlockData > | getData () const = 0 Gets the data for this block state. |
| virtual NotNull< Dimension > | getDimension () const = 0 Gets the dimension which contains the block represented by this block state. |
| virtual Location | getLocation () const = 0 Gets the location of this block state. |
| virtual const BlockType & | getType () const = 0 Gets the type of this block state. |
| virtual int | getX () const = 0 Gets the x-coordinate of this block state. |
| virtual int | getY () const = 0 Gets the y-coordinate of this block state. |
| virtual int | getZ () const = 0 Gets the z-coordinate of this block state. |
| virtual void | setData (const BlockData & data) = 0 Sets the data for this block state. |
| virtual void | setType (BlockTypeId type) = 0 Sets the type of this block state. |
| virtual bool | update () = 0 Attempts to update the block represented by this state, setting it to yhe new values as defined by this state. |
| virtual bool | update (bool force) = 0 Attempts to update the block represented by this state, setting it to the new values as defined by this state. |
| virtual bool | update (bool force, bool apply_physics) = 0 Attempts to update the block represented by this state, setting it to the new values as defined by this state. |
| ~BlockState () override |
Public Functions inherited from endstone::Object¶
See endstone::Object
| Type | Name |
|---|---|
| T * | as () Attempts to cast this object to the given type T. |
| const T * | as () const Attempts to cast this object to the given type T. |
| virtual const std::type_info & | getClassTypeId () const = 0 |
| bool | is () const Checks if this object is an instance of the given type T (or a subclass of T). |
| virtual bool | isInstanceOf (const std::type_info & target) const = 0 |
| virtual | ~Object () = default |
Public Functions Documentation¶
function getDelay¶
Gets the delay until the spawner spawns the next batch of actors.
Returns:
the delay, in ticks
function getMaxNearbyEntities¶
Gets the maximum number of similar actors allowed nearby before the spawner stops spawning.
Returns:
the maximum number of similar actors
function getMaxSpawnDelay¶
Gets the maximum delay the spawner will wait between spawns.
Returns:
the maximum delay, in ticks
function getMinSpawnDelay¶
Gets the minimum delay the spawner will wait between spawns.
Returns:
the minimum delay, in ticks
function getRequiredPlayerRange¶
Gets how far away a player must be for the spawner to be active.
Returns:
the required player range, in blocks
function getSpawnCount¶
Gets how many actors the spawner attempts to spawn at a time.
Returns:
the number of actors
function getSpawnRange¶
Gets the radius around the spawner in which actors are spawned.
Returns:
the spawn range, in blocks
function getSpawnedType¶
Gets the type of actor this spawner will spawn.
Returns:
the type of actor
function setDelay¶
Sets the delay until the spawner spawns the next batch of actors.
Parameters:
delaythe delay, in ticks
function setMaxNearbyEntities¶
Sets the maximum number of similar actors allowed nearby before the spawner stops spawning.
Parameters:
countthe maximum number of similar actors
function setMaxSpawnDelay¶
Sets the maximum delay the spawner will wait between spawns.
Parameters:
delaythe maximum delay, in ticks
function setMinSpawnDelay¶
Sets the minimum delay the spawner will wait between spawns.
Parameters:
delaythe minimum delay, in ticks
function setRequiredPlayerRange¶
Sets how far away a player must be for the spawner to be active.
Parameters:
rangethe required player range, in blocks
function setSpawnCount¶
Sets how many actors the spawner attempts to spawn at a time.
Parameters:
countthe number of actors
function setSpawnRange¶
Sets the radius around the spawner in which actors are spawned.
Parameters:
rangethe spawn range, in blocks
function setSpawnedType¶
Sets the type of actor this spawner will spawn.
Parameters:
typethe type of actor (e.g.minecraft:zombie)
The documentation for this class was generated from the following file include/endstone/block/creature_spawner.h