Class CreatureSpawnerStateMock
java.lang.Object
org.mockbukkit.mockbukkit.block.state.BlockStateMock
org.mockbukkit.mockbukkit.block.state.TileStateMock
org.mockbukkit.mockbukkit.block.state.CreatureSpawnerStateMock
- All Implemented Interfaces:
PersistentDataViewHolder,BlockState,CreatureSpawner,TileState,Metadatable,PersistentDataHolder,BaseSpawner,Spawner
Mock implementation of a
CreatureSpawner.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionCreatureSpawnerStateMock(@NotNull Material material) Constructs a newCreatureSpawnerStateMockfor the providedMaterial.protectedCreatureSpawnerStateMock(@NotNull Block block) Constructs a newCreatureSpawnerStateMockfor the providedBlock.protectedCreatureSpawnerStateMock(@NotNull CreatureSpawnerStateMock state) Constructs a newCreatureSpawnerStateMockby cloning the data from an existing one. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPotentialSpawn(@NotNull SpawnerEntry spawnerEntry) voidaddPotentialSpawn(@NotNull EntitySnapshot snapshot, int weight, @Nullable SpawnRule spawnRule) @NotNull CreatureSpawnerStateMockcopy()This returns a copy of thisBlockStateMock.@NotNull StringintgetDelay()intintint@NotNull List<SpawnerEntry> int@NotNull CreatureSpawnerStateMockThis returns a copy of thisBlockStateMock.int@Nullable EntitySnapshot@NotNull EntityTypeintbooleanvoidvoidsetCreatureTypeByName(@NotNull String creatureType) voidsetDelay(int delay) voidsetMaxNearbyEntities(int maxNearbyEntities) voidsetMaxSpawnDelay(int delay) voidsetMinSpawnDelay(int delay) voidsetPotentialSpawns(@NotNull Collection<SpawnerEntry> entries) voidsetRequiredPlayerRange(int requiredPlayerRange) voidsetSpawnCount(int spawnCount) voidsetSpawnedEntity(@NotNull SpawnerEntry spawnerEntry) voidsetSpawnedEntity(@NotNull EntitySnapshot snapshot) voidsetSpawnedItem(@NotNull ItemStack itemStack) voidsetSpawnedType(@NotNull EntityType creatureType) voidsetSpawnRange(int spawnRange) protected StringProvides the contents ofBlockStateMock.toString().Methods inherited from class org.mockbukkit.mockbukkit.block.state.TileStateMock
equals, getPersistentDataContainer, hashCode, isSnapshotMethods inherited from class org.mockbukkit.mockbukkit.block.state.BlockStateMock
checkType, checkType, checkType, checkType, copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getMetadata, getRawData, getType, getWorld, getX, getY, getZ, hasMetadata, isCollidable, isPlaced, mockState, mockState, removeMetadata, setBlockData, setData, setMetadata, setRawData, setType, toString, update, update, updateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.block.BlockState
copy, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Constructor Details
-
CreatureSpawnerStateMock
- Parameters:
material- The material this state is for.
-
CreatureSpawnerStateMock
- Parameters:
block- The block this state is for.
-
CreatureSpawnerStateMock
Constructs a newCreatureSpawnerStateMockby cloning the data from an existing one.- Parameters:
state- The state to clone.
-
-
Method Details
-
getSnapshot
Description copied from class:BlockStateMockThis returns a copy of thisBlockStateMock. Inheriters of this class must override this method!- Specified by:
getSnapshotin classTileStateMock- Returns:
- A snapshot of this
BlockStateMock.
-
copy
Description copied from class:BlockStateMockThis returns a copy of thisBlockStateMock. Inheriters of this class must override this method!- Specified by:
copyin interfaceBlockState- Overrides:
copyin classBlockStateMock- Returns:
- A copy of this
BlockStateMock.
-
getSpawnedType
- Specified by:
getSpawnedTypein interfaceBaseSpawner
-
setSpawnedType
- Specified by:
setSpawnedTypein interfaceBaseSpawner
-
setCreatureTypeByName
- Specified by:
setCreatureTypeByNamein interfaceCreatureSpawner
-
getCreatureTypeName
- Specified by:
getCreatureTypeNamein interfaceCreatureSpawner
-
getDelay
public int getDelay()- Specified by:
getDelayin interfaceBaseSpawner
-
setDelay
public void setDelay(int delay) - Specified by:
setDelayin interfaceBaseSpawner- Specified by:
setDelayin interfaceSpawner
-
getMinSpawnDelay
public int getMinSpawnDelay()- Specified by:
getMinSpawnDelayin interfaceSpawner
-
setMinSpawnDelay
public void setMinSpawnDelay(int delay) - Specified by:
setMinSpawnDelayin interfaceSpawner
-
getMaxSpawnDelay
public int getMaxSpawnDelay()- Specified by:
getMaxSpawnDelayin interfaceSpawner
-
setMaxSpawnDelay
public void setMaxSpawnDelay(int delay) - Specified by:
setMaxSpawnDelayin interfaceSpawner
-
getSpawnCount
public int getSpawnCount()- Specified by:
getSpawnCountin interfaceSpawner
-
setSpawnCount
public void setSpawnCount(int spawnCount) - Specified by:
setSpawnCountin interfaceSpawner
-
getMaxNearbyEntities
public int getMaxNearbyEntities()- Specified by:
getMaxNearbyEntitiesin interfaceSpawner
-
setMaxNearbyEntities
public void setMaxNearbyEntities(int maxNearbyEntities) - Specified by:
setMaxNearbyEntitiesin interfaceSpawner
-
getRequiredPlayerRange
public int getRequiredPlayerRange()- Specified by:
getRequiredPlayerRangein interfaceBaseSpawner
-
setRequiredPlayerRange
public void setRequiredPlayerRange(int requiredPlayerRange) - Specified by:
setRequiredPlayerRangein interfaceBaseSpawner
-
getSpawnRange
public int getSpawnRange()- Specified by:
getSpawnRangein interfaceBaseSpawner
-
setSpawnRange
public void setSpawnRange(int spawnRange) - Specified by:
setSpawnRangein interfaceBaseSpawner
-
getPotentialSpawns
- Specified by:
getPotentialSpawnsin interfaceBaseSpawner
-
setPotentialSpawns
- Specified by:
setPotentialSpawnsin interfaceBaseSpawner
-
addPotentialSpawn
- Specified by:
addPotentialSpawnin interfaceBaseSpawner
-
addPotentialSpawn
public void addPotentialSpawn(@NotNull @NotNull EntitySnapshot snapshot, int weight, @Nullable @Nullable SpawnRule spawnRule) - Specified by:
addPotentialSpawnin interfaceBaseSpawner
-
setSpawnedEntity
- Specified by:
setSpawnedEntityin interfaceBaseSpawner
-
setSpawnedEntity
- Specified by:
setSpawnedEntityin interfaceBaseSpawner
-
getSpawnedEntity
- Specified by:
getSpawnedEntityin interfaceBaseSpawner
-
isActivated
public boolean isActivated()- Specified by:
isActivatedin interfaceSpawner
-
resetTimer
public void resetTimer()- Specified by:
resetTimerin interfaceSpawner
-
setSpawnedItem
- Specified by:
setSpawnedItemin interfaceSpawner
-
toStringInternal
Description copied from class:BlockStateMockProvides the contents ofBlockStateMock.toString().Implementors must call super as in the following example.
@Override protected String toStringInternal() { return super.toStringInternal() + ", member1=" + member1 + ", member2=" + member2; }- Overrides:
toStringInternalin classTileStateMock- Returns:
- Comma separated list of properties and values.
-