Package be.seeseemelk.mockbukkit
Class WorldMock
java.lang.Object
be.seeseemelk.mockbukkit.WorldMock
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience
,net.kyori.adventure.audience.ForwardingAudience
,net.kyori.adventure.key.Keyed
,net.kyori.adventure.pointer.Pointered
,WorldInfo
,Keyed
,Metadatable
,PersistentDataHolder
,PluginMessageRecipient
,RegionAccessor
,World
Mock implementation of a
World
.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.audience.ForwardingAudience
net.kyori.adventure.audience.ForwardingAudience.Single
Nested classes/interfaces inherited from interface org.bukkit.World
World.ChunkLoadCallback, World.Environment, World.Spigot
-
Constructor Summary
ConstructorDescriptionCreates a new mock world with a height of 128 and will spawn grass until ay
of 4.WorldMock
(@NotNull WorldCreator creator) Creates a new mock world.Creates a new mock world with a height of 128.Creates a new mock world with a specific height from 0.Creates a new mock world.Creates a new mock world with a specific height from 0.Creates a new mock world. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addPluginChunkTicket
(int x, int z, Plugin plugin) boolean
void
clearMetadata
(Plugin plugin) @NotNull BlockMock
createBlock
(@NotNull Coordinate c) Makes sure that a certain block exists on the coordinate.boolean
createExplosion
(double x, double y, double z, float power) boolean
createExplosion
(double x, double y, double z, float power, boolean setFire) boolean
createExplosion
(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) boolean
createExplosion
(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) boolean
createExplosion
(@Nullable Entity source, @NotNull Location loc, float power, boolean setFire, boolean breakBlocks) boolean
createExplosion
(Location loc, float power) boolean
createExplosion
(Location loc, float power, boolean setFire) boolean
createExplosion
(Location loc, float power, boolean setFire, boolean breakBlocks) boolean
createExplosion
(Location loc, float power, boolean setFire, boolean breakBlocks, Entity source) boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.@NotNull ItemEntityMock
@NotNull ItemEntityMock
@NotNull ItemEntityMock
dropItemNaturally
(@NotNull Location loc, @NotNull ItemStack item) @NotNull ItemEntityMock
dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function) @Nullable Location
findLightningRod
(@NotNull Location location) @Nullable Location
findLightningTarget
(@NotNull Location location) boolean
generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type) boolean
generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<BlockState> stateConsumer) boolean
generateTree
(Location location, Random random, TreeType type, Predicate<BlockState> statePredicate) boolean
generateTree
(Location location, TreeType type) boolean
generateTree
(Location loc, TreeType type, BlockChangeDelegate delegate) Deprecated.boolean
boolean
int
Deprecated.int
Deprecated.@NotNull Biome
getBiome
(int x, int z) Deprecated.@NotNull Biome
getBiome
(int x, int y, int z) @NotNull Biome
protected @NotNull Map<Coordinate,
Biome> Gets a map of what biome is at each coordinate.@Nullable BiomeProvider
@NotNull BlockMock
getBlockAt
(int x, int y, int z) @NotNull BlockMock
getBlockAt
(@NotNull Coordinate coordinate) Gets the block at a coordinate.@NotNull BlockMock
getBlockAt
(@NotNull Location location) @NotNull Block
getBlockAtKey
(long key) Deprecated.@NotNull BlockData
getBlockData
(int x, int y, int z) @NotNull BlockData
getBlockData
(@NotNull Location location) @NotNull BlockState
getBlockState
(int x, int y, int z) @NotNull BlockState
getBlockState
(@NotNull Location location) @NotNull ChunkMock
getChunkAt
(int x, int z) @NotNull ChunkMock
getChunkAt
(int x, int z, boolean generate) @NotNull ChunkMock
getChunkAt
(@NotNull ChunkCoordinate coordinate) Gets the chunk at a specific chunk coordinate.@NotNull Chunk
getChunkAt
(@NotNull Block block) @NotNull Chunk
getChunkAt
(@NotNull Location location) @NotNull CompletableFuture<Chunk>
getChunkAtAsync
(int x, int z, boolean gen, boolean urgent) int
int
@NotNull Biome
getComputedBiome
(int x, int y, int z) double
@NotNull Difficulty
@NotNull ChunkSnapshotMock
getEmptyChunkSnapshot
(int chunkX, int chunkZ, boolean includeBiome, boolean includeBiomeTempRain) <T extends Entity>
@NotNull Collection<T>getEntitiesByClass
(@NotNull Class<T> cls) final <T extends Entity>
@NotNull Collection<T>getEntitiesByClass
(Class<T> @NotNull ... classes) @NotNull Collection<Entity>
getEntitiesByClasses
(Class<?> @NotNull ... classes) @Nullable Entity
int
@NotNull World.Environment
@NotNull Set<FeatureFlag>
@NotNull Collection<Chunk>
long
<T> T
getGameRuleDefault
(GameRule<T> rule) String @NotNull []
<T> T
getGameRuleValue
(@NotNull GameRule<T> rule) getGameRuleValue
(@Nullable String rule) Deprecated.long
@NotNull Block
getHighestBlockAt
(int x, int z) @NotNull Block
getHighestBlockAt
(int x, int z, HeightMap heightMap) @NotNull Block
getHighestBlockAt
(Location location) @NotNull Block
getHighestBlockAt
(Location location, HeightMap heightMap) int
getHighestBlockYAt
(int x, int z) int
getHighestBlockYAt
(int x, int z, @NotNull HeightmapType heightmap) Deprecated.int
getHighestBlockYAt
(int x, int z, HeightMap heightMap) int
getHighestBlockYAt
(@NotNull Location location) int
getHighestBlockYAt
(Location location, HeightMap heightMap) double
getHumidity
(int x, int z) Deprecated.double
getHumidity
(int x, int y, int z) @NotNull Collection<Material>
boolean
@NotNull NamespacedKey
getKey()
@NotNull List<LivingEntity>
Chunk @NotNull []
@NotNull Location
getLocationAtKey
(long key) int
int
@NotNull List<MetadataValue>
getMetadata
(@NotNull String metadataKey) int
int
Deprecated.@NotNull MoonPhase
@NotNull String
getName()
@NotNull Collection<Entity>
getNearbyEntities
(Location location, double x, double y, double z) @NotNull Collection<Entity>
getNearbyEntities
(Location location, double x, double y, double z, Predicate<Entity> filter) @NotNull Collection<Entity>
getNearbyEntities
(BoundingBox boundingBox) @NotNull Collection<Entity>
getNearbyEntities
(BoundingBox boundingBox, Predicate<Entity> filter) int
Deprecated.@NotNull PersistentDataContainer
int
@NotNull Map<Plugin,
Collection<Chunk>> @NotNull Collection<Plugin>
getPluginChunkTickets
(int x, int z) @NotNull List<BlockPopulator>
boolean
getPVP()
getRaids()
int
long
getSeed()
int
int
int
getSpawnLimit
(@NotNull SpawnCategory spawnCategory) @NotNull Location
double
getTemperature
(int x, int z) Deprecated.double
getTemperature
(int x, int y, int z) int
int
long
Deprecated.long
Deprecated.long
Deprecated.long
getTicksPerSpawns
(@NotNull SpawnCategory spawnCategory) long
Deprecated.long
Deprecated.long
Deprecated.int
long
getTime()
@NotNull Material
getType
(int x, int y, int z) @NotNull Material
@NotNull UUID
getUID()
int
int
int
Deprecated.int
Deprecated.int
@NotNull WorldBorderMock
@NotNull File
Deprecated.boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
boolean
hasCollisionsIn
(@NotNull BoundingBox boundingBox) boolean
hasMetadata
(@NotNull String metadataKey) boolean
hasRaids()
boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
boolean
hasStorm()
boolean
boolean
boolean
isChunkForceLoaded
(int x, int z) boolean
isChunkGenerated
(int x, int z) boolean
isChunkInUse
(int x, int z) Deprecated.boolean
isChunkLoaded
(int x, int z) boolean
isChunkLoaded
(Chunk chunk) boolean
boolean
boolean
boolean
isGameRule
(@Nullable String rule) boolean
boolean
boolean
boolean
boolean
boolean
Deprecated, for removal: This API element is subject to removal in a future version.boolean
boolean
lineOfSightExists
(@NotNull Location from, @NotNull Location to) void
loadChunk
(int x, int z) boolean
loadChunk
(int x, int z, boolean generate) void
@Nullable Location
locateNearestBiome
(@NotNull Location origin, @NotNull Biome biome, int radius) @Nullable Location
locateNearestBiome
(@NotNull Location origin, @NotNull Biome biome, int radius, int step) locateNearestRaid
(Location location, int radius) @Nullable StructureSearchResult
locateNearestStructure
(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored) @Nullable StructureSearchResult
locateNearestStructure
(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored) locateNearestStructure
(Location origin, StructureType structureType, int radius, boolean findUnexplored) Deprecated.void
playEffect
(@NotNull Location location, @NotNull Effect effect, int data) void
playEffect
(@NotNull Location location, @NotNull Effect effect, int data, int radius) <T> void
playEffect
(@NotNull Location location, @NotNull Effect effect, T data) <T> void
playEffect
(@NotNull Location location, @NotNull Effect effect, T data, int radius) void
void
playSound
(@NotNull Entity entity, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) void
void
playSound
(@NotNull Location location, @NotNull String sound, @NotNull SoundCategory category, float volume, float pitch) void
void
playSound
(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch) void
playSound
(@Nullable Entity entity, @Nullable Sound sound, @Nullable SoundCategory category, float volume, float pitch) void
rayTrace
(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, Predicate<Entity> filter) rayTraceBlocks
(Location start, Vector direction, double maxDistance) rayTraceBlocks
(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode) rayTraceBlocks
(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks) rayTraceEntities
(Location start, Vector direction, double maxDistance) rayTraceEntities
(Location start, Vector direction, double maxDistance, double raySize) rayTraceEntities
(Location start, Vector direction, double maxDistance, double raySize, Predicate<Entity> filter) rayTraceEntities
(Location start, Vector direction, double maxDistance, Predicate<Entity> filter) boolean
refreshChunk
(int x, int z) Deprecated.boolean
regenerateChunk
(int x, int z) Deprecated.void
removeMetadata
(@NotNull String metadataKey, @NotNull Plugin owningPlugin) boolean
removePluginChunkTicket
(int x, int z, Plugin plugin) void
removePluginChunkTickets
(Plugin plugin) void
save()
void
sendGameEvent
(@Nullable Entity sourceEntity, @NotNull GameEvent gameEvent, @NotNull Vector position) void
sendPluginMessage
(@NotNull Plugin source, @NotNull String channel, byte[] message) void
setAmbientSpawnLimit
(int limit) Deprecated.void
setAnimalSpawnLimit
(int limit) Deprecated.void
setAutoSave
(boolean value) void
void
Deprecated.void
void
setBlockData
(int x, int y, int z, @NotNull BlockData blockData) void
setBlockData
(@NotNull Location location, @NotNull BlockData blockData) void
setChunkForceLoaded
(int x, int z, boolean forced) void
setClearWeatherDuration
(int duration) void
setDifficulty
(@NotNull Difficulty difficulty) void
setEnvironment
(World.Environment environment) Set a new environment type for this world.void
setFullTime
(long time) <T> boolean
setGameRule
(GameRule<T> rule, T newValue) boolean
setGameRuleValue
(@Nullable String rule, @NotNull String value) Deprecated.void
setHardcore
(boolean hardcore) void
setKeepSpawnInMemory
(boolean keepLoaded) void
setMetadata
(@NotNull String metadataKey, @NotNull MetadataValue newMetadataValue) void
setMonsterSpawnLimit
(int limit) Deprecated.void
Give a new name to this world.void
setNoTickViewDistance
(int viewDistance) Deprecated.void
setPVP
(boolean pvp) void
setSendViewDistance
(int viewDistance) void
setSimulationDistance
(int simulationDistance) void
setSpawnFlags
(boolean allowMonsters, boolean allowAnimals) void
setSpawnLimit
(@NotNull SpawnCategory spawnCategory, int limit) boolean
setSpawnLocation
(int x, int y, int z) boolean
setSpawnLocation
(int x, int y, int z, float angle) boolean
setSpawnLocation
(@NotNull Location location) void
setStorm
(boolean hasStorm) void
setThunderDuration
(int duration) void
setThundering
(boolean thundering) void
setTicksPerAmbientSpawns
(int ticksPerAmbientSpawns) Deprecated.void
setTicksPerAnimalSpawns
(int ticksPerAnimalSpawns) Deprecated.void
setTicksPerMonsterSpawns
(int ticksPerMonsterSpawns) Deprecated.void
setTicksPerSpawns
(@NotNull SpawnCategory spawnCategory, int ticksPerCategorySpawn) void
setTicksPerWaterAmbientSpawns
(int ticksPerAmbientSpawns) Deprecated.void
setTicksPerWaterSpawns
(int ticksPerWaterSpawns) Deprecated.void
setTicksPerWaterUndergroundCreatureSpawns
(int ticksPerWaterUndergroundCreatureSpawns) Deprecated.void
setTime
(long time) void
void
void
setViewDistance
(int viewDistance) void
setWaterAmbientSpawnLimit
(int limit) void
setWaterAnimalSpawnLimit
(int limit) Deprecated.void
setWaterUndergroundCreatureSpawnLimit
(int limit) Deprecated.void
setWeatherDuration
(int duration) <T extends Entity>
T<T extends Entity>
Tspawn
(@NotNull Location location, @NotNull Class<T> clazz, boolean randomizeData, Consumer<T> function) <T extends Entity>
T<T extends Entity>
Tspawn
(@NotNull Location location, @NotNull Class<T> clazz, Consumer<T> function, @NotNull CreatureSpawnEvent.SpawnReason reason) <T extends Entity>
Tspawn
(@Nullable Location location, @Nullable Class<T> clazz, @Nullable Consumer<T> function, @NotNull CreatureSpawnEvent.SpawnReason reason, boolean randomizeData, boolean callSpawnEvent) Spawns an entity.@NotNull Arrow
spawnArrow
(Location location, Vector direction, float speed, float spread) <T extends AbstractArrow>
TspawnArrow
(Location location, Vector direction, float speed, float spread, Class<T> clazz) @NotNull Entity
spawnEntity
(@NotNull Location loc, @NotNull EntityType type) @NotNull Entity
spawnEntity
(@NotNull Location loc, @NotNull EntityType type, boolean randomizeData) @NotNull FallingBlock
spawnFallingBlock
(Location location, BlockData data) @NotNull FallingBlock
spawnFallingBlock
(Location location, MaterialData data) @NotNull FallingBlock
spawnFallingBlock
(Location location, Material material, byte data) Deprecated.<T> void
spawnParticle
(@NotNull Particle particle, @Nullable List<Player> receivers, @Nullable Player source, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) void
spawnParticle
(Particle particle, double x, double y, double z, int count) void
spawnParticle
(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) void
spawnParticle
(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> void
spawnParticle
(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> void
spawnParticle
(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) <T> void
spawnParticle
(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) <T> void
spawnParticle
(Particle particle, double x, double y, double z, int count, T data) void
spawnParticle
(Particle particle, Location location, int count) void
spawnParticle
(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ) void
spawnParticle
(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) <T> void
spawnParticle
(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) <T> void
spawnParticle
(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) <T> void
spawnParticle
(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data) <T> void
spawnParticle
(Particle particle, Location location, int count, T data) @NotNull World.Spigot
spigot()
@NotNull LightningStrike
strikeLightning
(Location loc) @NotNull LightningStrike
boolean
unloadChunk
(int x, int z) boolean
unloadChunk
(int x, int z, boolean save) boolean
unloadChunk
(@NotNull Chunk chunk) boolean
unloadChunkRequest
(int x, int z) @NotNull BiomeProvider
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.audience.Audience
deleteMessage, openBook, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, showTitle, stopSound
Methods inherited from interface net.kyori.adventure.audience.ForwardingAudience
clearTitle, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, playSound, playSound, playSound, pointers, resetTitle, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, stopSound
Methods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom
Methods inherited from interface org.bukkit.RegionAccessor
spawn, spawn, spawnEntity, spawnEntity
Methods inherited from interface org.bukkit.World
audiences, createExplosion, createExplosion, createExplosion, createExplosion, createExplosion, getChunkAt, getChunkAt, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsync, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getChunkAtAsyncUrgently, getHighestBlockAt, getHighestBlockAt, getHighestBlockYAt, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyEntitiesByType, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyLivingEntities, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, getNearbyPlayers, isChunkGenerated, spawnParticle
-
Constructor Details
-
WorldMock
Creates a new mock world.- Parameters:
defaultBlock
- The block that is spawned at locations 1 tograssHeight
minHeight
- The minimum height of the world.maxHeight
- The maximum height of the world.grassHeight
- The lasty
at whichdefaultBlock
will spawn.
-
WorldMock
public WorldMock(Material defaultBlock, Biome defaultBiome, int minHeight, int maxHeight, int grassHeight) Creates a new mock world.- Parameters:
defaultBlock
- The block that is spawned at locations 1 tograssHeight
defaultBiome
- The biome that every block will be in by default.minHeight
- The minimum height of the world.maxHeight
- The maximum height of the world.grassHeight
- The lasty
at whichdefaultBlock
will spawn.
-
WorldMock
Creates a new mock world.- Parameters:
creator
- TheWorldCreator
to use to create the world.
-
WorldMock
Creates a new mock world with a specific height from 0.- Parameters:
defaultBlock
- The block that is spawned at locations 1 tograssHeight
defaultBiome
- The biome that every block will be in by default.maxHeight
- The maximum height of the world.grassHeight
- The lasty
at whichdefaultBlock
will spawn.
-
WorldMock
Creates a new mock world with a specific height from 0.- Parameters:
defaultBlock
- The block that is spawned at locations 1 tograssHeight
maxHeight
- The maximum height of the world.grassHeight
- The lasty
at whichdefaultBlock
will spawn.
-
WorldMock
Creates a new mock world with a height of 128.- Parameters:
defaultBlock
- The block that is spawned at locations 1 tograssHeight
grassHeight
- The lasty
at whichdefaultBlock
will spawn.
-
WorldMock
public WorldMock()Creates a new mock world with a height of 128 and will spawn grass until ay
of 4.
-
-
Method Details
-
createBlock
Makes sure that a certain block exists on the coordinate. Returns that block.- Parameters:
c
- Creates a block on the given coordinate.- Returns:
- A newly created block at that location.
-
getEntityCount
public int getEntityCount()- Specified by:
getEntityCount
in interfaceWorld
-
getTileEntityCount
public int getTileEntityCount()- Specified by:
getTileEntityCount
in interfaceWorld
-
getTickableTileEntityCount
public int getTickableTileEntityCount()- Specified by:
getTickableTileEntityCount
in interfaceWorld
-
getChunkCount
public int getChunkCount()- Specified by:
getChunkCount
in interfaceWorld
-
getPlayerCount
public int getPlayerCount()- Specified by:
getPlayerCount
in interfaceWorld
-
getMoonPhase
- Specified by:
getMoonPhase
in interfaceRegionAccessor
-
lineOfSightExists
- Specified by:
lineOfSightExists
in interfaceRegionAccessor
-
hasCollisionsIn
- Specified by:
hasCollisionsIn
in interfaceRegionAccessor
-
getBlockAt
- Specified by:
getBlockAt
in interfaceWorld
-
getBlockAt
Gets the block at a coordinate.- Parameters:
coordinate
- The coordinate at which to get the block.- Returns:
- The block.
-
getBlockAt
- Specified by:
getBlockAt
in interfaceWorld
-
getBlockAtKey
Deprecated.- Specified by:
getBlockAtKey
in interfaceWorld
-
getLocationAtKey
- Specified by:
getLocationAtKey
in interfaceWorld
-
getName
-
setName
Give a new name to this world.- Parameters:
name
- The new name of this world.
-
getUID
-
getSpawnLocation
- Specified by:
getSpawnLocation
in interfaceWorld
-
setSpawnLocation
- Specified by:
setSpawnLocation
in interfaceWorld
-
setSpawnLocation
public boolean setSpawnLocation(int x, int y, int z) - Specified by:
setSpawnLocation
in interfaceWorld
-
getEntities
- Specified by:
getEntities
in interfaceRegionAccessor
- Specified by:
getEntities
in interfaceWorld
-
getChunkAt
- Specified by:
getChunkAt
in interfaceWorld
-
getChunkAt
- Specified by:
getChunkAt
in interfaceWorld
-
getChunkAt
Gets the chunk at a specific chunk coordinate.If there is no chunk recorded at the location, one will be created.
- Parameters:
coordinate
- The coordinate at which to get the chunk.- Returns:
- The chunk at the location.
-
sendPluginMessage
public void sendPluginMessage(@NotNull @NotNull Plugin source, @NotNull @NotNull String channel, byte[] message) - Specified by:
sendPluginMessage
in interfacePluginMessageRecipient
-
getListeningPluginChannels
- Specified by:
getListeningPluginChannels
in interfacePluginMessageRecipient
-
setMetadata
public void setMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull MetadataValue newMetadataValue) - Specified by:
setMetadata
in interfaceMetadatable
-
getMetadata
- Specified by:
getMetadata
in interfaceMetadatable
-
hasMetadata
- Specified by:
hasMetadata
in interfaceMetadatable
-
removeMetadata
public void removeMetadata(@NotNull @NotNull String metadataKey, @NotNull @NotNull Plugin owningPlugin) - Specified by:
removeMetadata
in interfaceMetadatable
-
clearMetadata
- See Also:
-
getHighestBlockYAt
public int getHighestBlockYAt(int x, int z) - Specified by:
getHighestBlockYAt
in interfaceRegionAccessor
-
getHighestBlockYAt
- Specified by:
getHighestBlockYAt
in interfaceRegionAccessor
-
getHighestBlockAt
- Specified by:
getHighestBlockAt
in interfaceWorld
-
getHighestBlockAt
- Specified by:
getHighestBlockAt
in interfaceWorld
-
getHighestBlockYAt
@Deprecated(since="1.15") public int getHighestBlockYAt(int x, int z, @NotNull @NotNull HeightmapType heightmap) throws UnsupportedOperationException Deprecated.- Specified by:
getHighestBlockYAt
in interfaceWorld
- Throws:
UnsupportedOperationException
-
getChunkAt
- Specified by:
getChunkAt
in interfaceWorld
-
getChunkAt
- Specified by:
getChunkAt
in interfaceWorld
-
isChunkLoaded
- Specified by:
isChunkLoaded
in interfaceWorld
-
getLoadedChunks
- Specified by:
getLoadedChunks
in interfaceWorld
-
loadChunk
-
isChunkLoaded
public boolean isChunkLoaded(int x, int z) - Specified by:
isChunkLoaded
in interfaceWorld
-
isChunkInUse
Deprecated.- Specified by:
isChunkInUse
in interfaceWorld
-
loadChunk
public void loadChunk(int x, int z) -
loadChunk
public boolean loadChunk(int x, int z, boolean generate) -
unloadChunk
- Specified by:
unloadChunk
in interfaceWorld
-
unloadChunk
public boolean unloadChunk(int x, int z) - Specified by:
unloadChunk
in interfaceWorld
-
unloadChunk
public boolean unloadChunk(int x, int z, boolean save) - Specified by:
unloadChunk
in interfaceWorld
-
unloadChunkRequest
public boolean unloadChunkRequest(int x, int z) - Specified by:
unloadChunkRequest
in interfaceWorld
-
regenerateChunk
Deprecated.- Specified by:
regenerateChunk
in interfaceWorld
-
refreshChunk
Deprecated.- Specified by:
refreshChunk
in interfaceWorld
-
dropItem
@NotNull public @NotNull ItemEntityMock dropItem(@NotNull @NotNull Location loc, @NotNull @NotNull ItemStack item, @Nullable @Nullable Consumer<Item> function) -
dropItem
@NotNull public @NotNull ItemEntityMock dropItem(@NotNull @NotNull Location loc, @NotNull @NotNull ItemStack item) -
dropItemNaturally
@NotNull public @NotNull ItemEntityMock dropItemNaturally(@NotNull @NotNull Location location, @NotNull @NotNull ItemStack item, @Nullable @Nullable Consumer<Item> function) - Specified by:
dropItemNaturally
in interfaceWorld
-
dropItemNaturally
@NotNull public @NotNull ItemEntityMock dropItemNaturally(@NotNull @NotNull Location loc, @NotNull @NotNull ItemStack item) - Specified by:
dropItemNaturally
in interfaceWorld
-
spawnArrow
@NotNull public @NotNull Arrow spawnArrow(Location location, Vector direction, float speed, float spread) - Specified by:
spawnArrow
in interfaceWorld
-
generateTree
- Specified by:
generateTree
in interfaceWorld
-
generateTree
@Deprecated(since="1.17") public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) Deprecated.- Specified by:
generateTree
in interfaceWorld
-
generateTree
public boolean generateTree(Location location, Random random, TreeType type, Predicate<BlockState> statePredicate) - Specified by:
generateTree
in interfaceRegionAccessor
-
spawn
@NotNull public <T extends Entity> T spawn(@NotNull @NotNull Location location, @NotNull @NotNull Class<T> clazz) throws IllegalArgumentException - Specified by:
spawn
in interfaceRegionAccessor
- Throws:
IllegalArgumentException
-
spawn
@NotNull public <T extends Entity> T spawn(@NotNull @NotNull Location location, @NotNull @NotNull Class<T> clazz, Consumer<T> function) throws IllegalArgumentException - Specified by:
spawn
in interfaceRegionAccessor
- Throws:
IllegalArgumentException
-
spawn
@NotNull public <T extends Entity> T spawn(@NotNull @NotNull Location location, @NotNull @NotNull Class<T> clazz, boolean randomizeData, Consumer<T> function) throws IllegalArgumentException - Specified by:
spawn
in interfaceRegionAccessor
- Throws:
IllegalArgumentException
-
spawn
@NotNull public <T extends Entity> T spawn(@NotNull @NotNull Location location, @NotNull @NotNull Class<T> clazz, Consumer<T> function, @NotNull CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException - Specified by:
spawn
in interfaceRegionAccessor
- Throws:
IllegalArgumentException
-
spawn
@NotNull public <T extends Entity> T spawn(@Nullable @Nullable Location location, @Nullable @Nullable Class<T> clazz, @Nullable @Nullable Consumer<T> function, @NotNull CreatureSpawnEvent.SpawnReason reason, boolean randomizeData, boolean callSpawnEvent) Spawns an entity.- Type Parameters:
T
- The entity type.- Parameters:
location
- The location to spawn the entity at.clazz
- The class of entity to spawn. This should be the class of the Bukkit interface, not the mock.function
- A function to call once the entity has been spawned.reason
- The reason for spawning the entity.randomizeData
- Whether data should be randomized. Currently, does nothing.callSpawnEvent
- Whether the entities spawn event should be called- Returns:
- The spawned entity.
-
spawnEntity
@NotNull public @NotNull Entity spawnEntity(@NotNull @NotNull Location loc, @NotNull @NotNull EntityType type) - Specified by:
spawnEntity
in interfaceRegionAccessor
-
spawnEntity
@NotNull public @NotNull Entity spawnEntity(@NotNull @NotNull Location loc, @NotNull @NotNull EntityType type, boolean randomizeData) - Specified by:
spawnEntity
in interfaceRegionAccessor
-
strikeLightning
- Specified by:
strikeLightning
in interfaceWorld
-
strikeLightningEffect
- Specified by:
strikeLightningEffect
in interfaceWorld
-
findLightningRod
- Specified by:
findLightningRod
in interfaceWorld
-
findLightningTarget
- Specified by:
findLightningTarget
in interfaceWorld
-
getLivingEntities
- Specified by:
getLivingEntities
in interfaceRegionAccessor
- Specified by:
getLivingEntities
in interfaceWorld
-
getEntitiesByClass
@SafeVarargs @NotNull public final <T extends Entity> @NotNull Collection<T> getEntitiesByClass(Class<T> @NotNull ... classes) - Specified by:
getEntitiesByClass
in interfaceWorld
-
getEntitiesByClass
@NotNull public <T extends Entity> @NotNull Collection<T> getEntitiesByClass(@NotNull @NotNull Class<T> cls) - Specified by:
getEntitiesByClass
in interfaceRegionAccessor
- Specified by:
getEntitiesByClass
in interfaceWorld
-
getEntitiesByClasses
- Specified by:
getEntitiesByClasses
in interfaceRegionAccessor
- Specified by:
getEntitiesByClasses
in interfaceWorld
-
getChunkAtAsync
@NotNull public @NotNull CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) - Specified by:
getChunkAtAsync
in interfaceWorld
-
getPlayers
- Specified by:
getPlayers
in interfaceWorld
-
getNearbyEntities
@NotNull public @NotNull Collection<Entity> getNearbyEntities(Location location, double x, double y, double z) - Specified by:
getNearbyEntities
in interfaceWorld
-
getEntity
-
getTime
public long getTime() -
setTime
public void setTime(long time) -
getFullTime
public long getFullTime()- Specified by:
getFullTime
in interfaceWorld
-
setFullTime
public void setFullTime(long time) - Specified by:
setFullTime
in interfaceWorld
-
isDayTime
public boolean isDayTime() -
hasStorm
public boolean hasStorm() -
setStorm
public void setStorm(boolean hasStorm) -
getWeatherDuration
public int getWeatherDuration()- Specified by:
getWeatherDuration
in interfaceWorld
-
setWeatherDuration
public void setWeatherDuration(int duration) - Specified by:
setWeatherDuration
in interfaceWorld
-
isThundering
public boolean isThundering()- Specified by:
isThundering
in interfaceWorld
-
setThundering
public void setThundering(boolean thundering) - Specified by:
setThundering
in interfaceWorld
-
getThunderDuration
public int getThunderDuration()- Specified by:
getThunderDuration
in interfaceWorld
-
setThunderDuration
public void setThunderDuration(int duration) - Specified by:
setThunderDuration
in interfaceWorld
-
isClearWeather
public boolean isClearWeather()- Specified by:
isClearWeather
in interfaceWorld
-
getClearWeatherDuration
public int getClearWeatherDuration()- Specified by:
getClearWeatherDuration
in interfaceWorld
-
setClearWeatherDuration
public void setClearWeatherDuration(int duration) - Specified by:
setClearWeatherDuration
in interfaceWorld
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power) - Specified by:
createExplosion
in interfaceWorld
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power, boolean setFire) - Specified by:
createExplosion
in interfaceWorld
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) - Specified by:
createExplosion
in interfaceWorld
-
createExplosion
- Specified by:
createExplosion
in interfaceWorld
-
createExplosion
- Specified by:
createExplosion
in interfaceWorld
-
createExplosion
public boolean createExplosion(@Nullable @Nullable Entity source, @NotNull @NotNull Location loc, float power, boolean setFire, boolean breakBlocks) - Specified by:
createExplosion
in interfaceWorld
-
getEnvironment
- Specified by:
getEnvironment
in interfaceWorldInfo
-
setEnvironment
Set a new environment type for this world.- Parameters:
environment
- The world environnement type.
-
getSeed
public long getSeed() -
getPVP
public boolean getPVP() -
setPVP
public void setPVP(boolean pvp) -
getGenerator
- Specified by:
getGenerator
in interfaceWorld
-
getBiomeProvider
- Specified by:
getBiomeProvider
in interfaceWorld
-
save
public void save() -
getPopulators
- Specified by:
getPopulators
in interfaceWorld
-
spawnFallingBlock
@NotNull public @NotNull FallingBlock spawnFallingBlock(Location location, MaterialData data) throws IllegalArgumentException - Specified by:
spawnFallingBlock
in interfaceWorld
- Throws:
IllegalArgumentException
-
spawnFallingBlock
@Deprecated(since="1.7.5") @NotNull public @NotNull FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException Deprecated.- Specified by:
spawnFallingBlock
in interfaceWorld
- Throws:
IllegalArgumentException
-
playEffect
public void playEffect(@NotNull @NotNull Location location, @NotNull @NotNull Effect effect, int data) - Specified by:
playEffect
in interfaceWorld
-
playEffect
public void playEffect(@NotNull @NotNull Location location, @NotNull @NotNull Effect effect, int data, int radius) - Specified by:
playEffect
in interfaceWorld
-
playEffect
public <T> void playEffect(@NotNull @NotNull Location location, @NotNull @NotNull Effect effect, T data) - Specified by:
playEffect
in interfaceWorld
-
playEffect
public <T> void playEffect(@NotNull @NotNull Location location, @NotNull @NotNull Effect effect, @Nullable T data, int radius) - Specified by:
playEffect
in interfaceWorld
-
getEmptyChunkSnapshot
@NotNull public @NotNull ChunkSnapshotMock getEmptyChunkSnapshot(int chunkX, int chunkZ, boolean includeBiome, boolean includeBiomeTempRain) - Specified by:
getEmptyChunkSnapshot
in interfaceWorld
-
setSpawnFlags
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals) - Specified by:
setSpawnFlags
in interfaceWorld
-
getAllowAnimals
public boolean getAllowAnimals()- Specified by:
getAllowAnimals
in interfaceWorld
-
getAllowMonsters
public boolean getAllowMonsters()- Specified by:
getAllowMonsters
in interfaceWorld
-
getBiome
Deprecated. -
setBiome
Deprecated. -
getTemperature
Deprecated.- Specified by:
getTemperature
in interfaceWorld
-
getHumidity
Deprecated.- Specified by:
getHumidity
in interfaceWorld
-
getMinHeight
public int getMinHeight()- Specified by:
getMinHeight
in interfaceWorldInfo
-
getMaxHeight
public int getMaxHeight()- Specified by:
getMaxHeight
in interfaceWorldInfo
-
vanillaBiomeProvider
- Specified by:
vanillaBiomeProvider
in interfaceWorldInfo
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevel
in interfaceWorld
-
getKeepSpawnInMemory
public boolean getKeepSpawnInMemory()- Specified by:
getKeepSpawnInMemory
in interfaceWorld
-
setKeepSpawnInMemory
public void setKeepSpawnInMemory(boolean keepLoaded) - Specified by:
setKeepSpawnInMemory
in interfaceWorld
-
isAutoSave
public boolean isAutoSave()- Specified by:
isAutoSave
in interfaceWorld
-
setAutoSave
public void setAutoSave(boolean value) - Specified by:
setAutoSave
in interfaceWorld
-
getDifficulty
- Specified by:
getDifficulty
in interfaceWorld
-
setDifficulty
- Specified by:
setDifficulty
in interfaceWorld
-
getWorldFolder
- Specified by:
getWorldFolder
in interfaceWorld
-
getWorldType
Deprecated.- Specified by:
getWorldType
in interfaceWorld
-
canGenerateStructures
public boolean canGenerateStructures()- Specified by:
canGenerateStructures
in interfaceWorld
-
getTicksPerAnimalSpawns
Deprecated.- Specified by:
getTicksPerAnimalSpawns
in interfaceWorld
-
setTicksPerAnimalSpawns
Deprecated.- Specified by:
setTicksPerAnimalSpawns
in interfaceWorld
-
getTicksPerMonsterSpawns
Deprecated.- Specified by:
getTicksPerMonsterSpawns
in interfaceWorld
-
setTicksPerMonsterSpawns
Deprecated.- Specified by:
setTicksPerMonsterSpawns
in interfaceWorld
-
getMonsterSpawnLimit
Deprecated.- Specified by:
getMonsterSpawnLimit
in interfaceWorld
-
setMonsterSpawnLimit
Deprecated.- Specified by:
setMonsterSpawnLimit
in interfaceWorld
-
getAnimalSpawnLimit
Deprecated.- Specified by:
getAnimalSpawnLimit
in interfaceWorld
-
setAnimalSpawnLimit
Deprecated.- Specified by:
setAnimalSpawnLimit
in interfaceWorld
-
getWaterAnimalSpawnLimit
Deprecated.- Specified by:
getWaterAnimalSpawnLimit
in interfaceWorld
-
setWaterAnimalSpawnLimit
Deprecated.- Specified by:
setWaterAnimalSpawnLimit
in interfaceWorld
-
getWaterUndergroundCreatureSpawnLimit
Deprecated.- Specified by:
getWaterUndergroundCreatureSpawnLimit
in interfaceWorld
-
setWaterUndergroundCreatureSpawnLimit
Deprecated.- Specified by:
setWaterUndergroundCreatureSpawnLimit
in interfaceWorld
-
getAmbientSpawnLimit
Deprecated.- Specified by:
getAmbientSpawnLimit
in interfaceWorld
-
setAmbientSpawnLimit
Deprecated.- Specified by:
setAmbientSpawnLimit
in interfaceWorld
-
playSound
-
playSound
-
playSound
public void playSound(@NotNull @NotNull Location location, @NotNull @NotNull Sound sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
playSound
public void playSound(@NotNull @NotNull Location location, @NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
playSound
-
playSound
-
playSound
public void playSound(@NotNull @NotNull Entity entity, @NotNull @NotNull String sound, @NotNull @NotNull SoundCategory category, float volume, float pitch) -
playSound
public void playSound(@Nullable @Nullable Entity entity, @Nullable @Nullable Sound sound, @Nullable @Nullable SoundCategory category, float volume, float pitch) -
getGameRules
- Specified by:
getGameRules
in interfaceWorld
-
getGameRuleValue
Deprecated.- Specified by:
getGameRuleValue
in interfaceWorld
-
setGameRuleValue
@Deprecated(since="1.13") public boolean setGameRuleValue(@Nullable @Nullable String rule, @NotNull @NotNull String value) Deprecated.- Specified by:
setGameRuleValue
in interfaceWorld
-
isGameRule
- Specified by:
isGameRule
in interfaceWorld
-
getWorldBorder
- Specified by:
getWorldBorder
in interfaceWorld
-
spawnParticle
- Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
- Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
- Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
- Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public <T> void spawnParticle(@NotNull @NotNull Particle particle, @Nullable @Nullable List<Player> receivers, @Nullable @Nullable Player source, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force) - Specified by:
spawnParticle
in interfaceWorld
-
spawnFallingBlock
@NotNull public @NotNull FallingBlock spawnFallingBlock(Location location, BlockData data) throws IllegalArgumentException - Specified by:
spawnFallingBlock
in interfaceWorld
- Throws:
IllegalArgumentException
-
getGameRuleValue
- Specified by:
getGameRuleValue
in interfaceWorld
-
getGameRuleDefault
- Specified by:
getGameRuleDefault
in interfaceWorld
-
setGameRule
- Specified by:
setGameRule
in interfaceWorld
-
isChunkGenerated
public boolean isChunkGenerated(int x, int z) - Specified by:
isChunkGenerated
in interfaceWorld
-
getNearbyEntities
@NotNull public @NotNull Collection<Entity> getNearbyEntities(Location location, double x, double y, double z, Predicate<Entity> filter) - Specified by:
getNearbyEntities
in interfaceWorld
-
getNearbyEntities
- Specified by:
getNearbyEntities
in interfaceWorld
-
getNearbyEntities
@NotNull public @NotNull Collection<Entity> getNearbyEntities(BoundingBox boundingBox, Predicate<Entity> filter) - Specified by:
getNearbyEntities
in interfaceWorld
-
rayTraceEntities
- Specified by:
rayTraceEntities
in interfaceWorld
-
rayTraceEntities
public RayTraceResult rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize) - Specified by:
rayTraceEntities
in interfaceWorld
-
rayTraceEntities
public RayTraceResult rayTraceEntities(Location start, Vector direction, double maxDistance, Predicate<Entity> filter) - Specified by:
rayTraceEntities
in interfaceWorld
-
rayTraceEntities
public RayTraceResult rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize, Predicate<Entity> filter) - Specified by:
rayTraceEntities
in interfaceWorld
-
rayTraceBlocks
- Specified by:
rayTraceBlocks
in interfaceWorld
-
rayTraceBlocks
public RayTraceResult rayTraceBlocks(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode) - Specified by:
rayTraceBlocks
in interfaceWorld
-
rayTraceBlocks
public RayTraceResult rayTraceBlocks(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks) - Specified by:
rayTraceBlocks
in interfaceWorld
-
rayTrace
public RayTraceResult rayTrace(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, Predicate<Entity> filter) -
spawnParticle
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) - Specified by:
spawnParticle
in interfaceWorld
-
spawnParticle
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) - Specified by:
spawnParticle
in interfaceWorld
-
locateNearestStructure
@Deprecated(since="1.19") public Location locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored) Deprecated.- Specified by:
locateNearestStructure
in interfaceWorld
-
locateNearestStructure
@Nullable public @Nullable StructureSearchResult locateNearestStructure(@NotNull @NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored) - Specified by:
locateNearestStructure
in interfaceWorld
-
locateNearestStructure
@Nullable public @Nullable StructureSearchResult locateNearestStructure(@NotNull @NotNull Location origin, @NotNull @NotNull Structure structure, int radius, boolean findUnexplored) - Specified by:
locateNearestStructure
in interfaceWorld
-
locateNearestBiome
@Nullable public @Nullable Location locateNearestBiome(@NotNull @NotNull Location origin, @NotNull @NotNull Biome biome, int radius) - Specified by:
locateNearestBiome
in interfaceWorld
-
locateNearestBiome
@Nullable public @Nullable Location locateNearestBiome(@NotNull @NotNull Location origin, @NotNull @NotNull Biome biome, int radius, int step) - Specified by:
locateNearestBiome
in interfaceWorld
-
isUltrawarm
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isUltrawarm
in interfaceWorld
-
getCoordinateScale
public double getCoordinateScale()- Specified by:
getCoordinateScale
in interfaceWorld
-
hasSkylight
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
hasSkylight
in interfaceWorld
-
hasBedrockCeiling
@Deprecated(forRemoval=true) @ScheduledForRemoval(inVersion="1.21") public boolean hasBedrockCeiling()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
hasBedrockCeiling
in interfaceWorld
-
doesBedWork
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doesBedWork
in interfaceWorld
-
doesRespawnAnchorWork
@Deprecated(forRemoval=true) @ScheduledForRemoval(inVersion="1.21") public boolean doesRespawnAnchorWork()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doesRespawnAnchorWork
in interfaceWorld
-
isFixedTime
public boolean isFixedTime()- Specified by:
isFixedTime
in interfaceWorld
-
getInfiniburn
- Specified by:
getInfiniburn
in interfaceWorld
-
sendGameEvent
public void sendGameEvent(@Nullable @Nullable Entity sourceEntity, @NotNull @NotNull GameEvent gameEvent, @NotNull @NotNull Vector position) - Specified by:
sendGameEvent
in interfaceWorld
-
isChunkForceLoaded
public boolean isChunkForceLoaded(int x, int z) - Specified by:
isChunkForceLoaded
in interfaceWorld
-
setChunkForceLoaded
public void setChunkForceLoaded(int x, int z, boolean forced) - Specified by:
setChunkForceLoaded
in interfaceWorld
-
getForceLoadedChunks
- Specified by:
getForceLoadedChunks
in interfaceWorld
-
addPluginChunkTicket
- Specified by:
addPluginChunkTicket
in interfaceWorld
-
removePluginChunkTicket
- Specified by:
removePluginChunkTicket
in interfaceWorld
-
removePluginChunkTickets
- Specified by:
removePluginChunkTickets
in interfaceWorld
-
getPluginChunkTickets
- Specified by:
getPluginChunkTickets
in interfaceWorld
-
getPluginChunkTickets
- Specified by:
getPluginChunkTickets
in interfaceWorld
-
spawnArrow
@NotNull public <T extends AbstractArrow> T spawnArrow(Location location, Vector direction, float speed, float spread, Class<T> clazz) - Specified by:
spawnArrow
in interfaceWorld
-
locateNearestRaid
- Specified by:
locateNearestRaid
in interfaceWorld
-
getRaids
-
createExplosion
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) - Specified by:
createExplosion
in interfaceWorld
-
createExplosion
- Specified by:
createExplosion
in interfaceWorld
-
createExplosion
public boolean createExplosion(Location loc, float power, boolean setFire, boolean breakBlocks, Entity source) - Specified by:
createExplosion
in interfaceWorld
-
getHighestBlockYAt
- Specified by:
getHighestBlockYAt
in interfaceRegionAccessor
-
getHighestBlockYAt
- Specified by:
getHighestBlockYAt
in interfaceRegionAccessor
-
getHighestBlockAt
- Specified by:
getHighestBlockAt
in interfaceWorld
-
getHighestBlockAt
- Specified by:
getHighestBlockAt
in interfaceWorld
-
getBiome
- Specified by:
getBiome
in interfaceRegionAccessor
-
getBiome
- Specified by:
getBiome
in interfaceRegionAccessor
-
getComputedBiome
- Specified by:
getComputedBiome
in interfaceRegionAccessor
-
setBiome
- Specified by:
setBiome
in interfaceRegionAccessor
-
setBiome
- Specified by:
setBiome
in interfaceRegionAccessor
-
getBiomeMap
Gets a map of what biome is at each coordinate.- Returns:
- A clone of the internal biome map.
-
getDefaultBiome
- Returns:
- The default biome of this world.
-
getBlockState
- Specified by:
getBlockState
in interfaceRegionAccessor
-
getBlockState
- Specified by:
getBlockState
in interfaceRegionAccessor
-
getBlockData
- Specified by:
getBlockData
in interfaceRegionAccessor
-
getBlockData
- Specified by:
getBlockData
in interfaceRegionAccessor
-
getType
- Specified by:
getType
in interfaceRegionAccessor
-
getType
- Specified by:
getType
in interfaceRegionAccessor
-
setBlockData
public void setBlockData(@NotNull @NotNull Location location, @NotNull @NotNull BlockData blockData) - Specified by:
setBlockData
in interfaceRegionAccessor
-
setBlockData
- Specified by:
setBlockData
in interfaceRegionAccessor
-
setType
- Specified by:
setType
in interfaceRegionAccessor
-
setType
- Specified by:
setType
in interfaceRegionAccessor
-
generateTree
public boolean generateTree(@NotNull @NotNull Location location, @NotNull @NotNull Random random, @NotNull @NotNull TreeType type) - Specified by:
generateTree
in interfaceRegionAccessor
-
generateTree
public boolean generateTree(@NotNull @NotNull Location location, @NotNull @NotNull Random random, @NotNull @NotNull TreeType type, @Nullable @Nullable Consumer<BlockState> stateConsumer) - Specified by:
generateTree
in interfaceRegionAccessor
-
getTemperature
public double getTemperature(int x, int y, int z) - Specified by:
getTemperature
in interfaceWorld
-
getHumidity
public double getHumidity(int x, int y, int z) - Specified by:
getHumidity
in interfaceWorld
-
getLogicalHeight
public int getLogicalHeight()- Specified by:
getLogicalHeight
in interfaceWorld
-
isNatural
public boolean isNatural() -
isBedWorks
public boolean isBedWorks()- Specified by:
isBedWorks
in interfaceWorld
-
hasSkyLight
public boolean hasSkyLight()- Specified by:
hasSkyLight
in interfaceWorld
-
hasCeiling
public boolean hasCeiling()- Specified by:
hasCeiling
in interfaceWorld
-
isPiglinSafe
public boolean isPiglinSafe()- Specified by:
isPiglinSafe
in interfaceWorld
-
isRespawnAnchorWorks
public boolean isRespawnAnchorWorks()- Specified by:
isRespawnAnchorWorks
in interfaceWorld
-
hasRaids
public boolean hasRaids() -
isUltraWarm
public boolean isUltraWarm()- Specified by:
isUltraWarm
in interfaceWorld
-
isHardcore
public boolean isHardcore()- Specified by:
isHardcore
in interfaceWorld
-
setHardcore
public void setHardcore(boolean hardcore) - Specified by:
setHardcore
in interfaceWorld
-
getTicksPerWaterSpawns
Deprecated.- Specified by:
getTicksPerWaterSpawns
in interfaceWorld
-
setTicksPerWaterSpawns
Deprecated.- Specified by:
setTicksPerWaterSpawns
in interfaceWorld
-
getTicksPerAmbientSpawns
Deprecated.- Specified by:
getTicksPerAmbientSpawns
in interfaceWorld
-
setTicksPerAmbientSpawns
Deprecated.- Specified by:
setTicksPerAmbientSpawns
in interfaceWorld
-
getEnderDragonBattle
- Specified by:
getEnderDragonBattle
in interfaceWorld
-
getFeatureFlags
- Specified by:
getFeatureFlags
in interfaceWorld
-
setSpawnLocation
public boolean setSpawnLocation(int x, int y, int z, float angle) - Specified by:
setSpawnLocation
in interfaceWorld
-
getTicksPerWaterAmbientSpawns
Deprecated.- Specified by:
getTicksPerWaterAmbientSpawns
in interfaceWorld
-
setTicksPerWaterAmbientSpawns
Deprecated.- Specified by:
setTicksPerWaterAmbientSpawns
in interfaceWorld
-
getTicksPerWaterUndergroundCreatureSpawns
Deprecated.- Specified by:
getTicksPerWaterUndergroundCreatureSpawns
in interfaceWorld
-
setTicksPerWaterUndergroundCreatureSpawns
@Deprecated(since="1.18") public void setTicksPerWaterUndergroundCreatureSpawns(int ticksPerWaterUndergroundCreatureSpawns) Deprecated.- Specified by:
setTicksPerWaterUndergroundCreatureSpawns
in interfaceWorld
-
getWaterAmbientSpawnLimit
public int getWaterAmbientSpawnLimit()- Specified by:
getWaterAmbientSpawnLimit
in interfaceWorld
-
setWaterAmbientSpawnLimit
public void setWaterAmbientSpawnLimit(int limit) - Specified by:
setWaterAmbientSpawnLimit
in interfaceWorld
-
getViewDistance
public int getViewDistance()- Specified by:
getViewDistance
in interfaceWorld
-
setViewDistance
public void setViewDistance(int viewDistance) - Specified by:
setViewDistance
in interfaceWorld
-
setSimulationDistance
public void setSimulationDistance(int simulationDistance) - Specified by:
setSimulationDistance
in interfaceWorld
-
getNoTickViewDistance
Deprecated.- Specified by:
getNoTickViewDistance
in interfaceWorld
-
setNoTickViewDistance
Deprecated.- Specified by:
setNoTickViewDistance
in interfaceWorld
-
getSendViewDistance
public int getSendViewDistance()- Specified by:
getSendViewDistance
in interfaceWorld
-
setSendViewDistance
public void setSendViewDistance(int viewDistance) - Specified by:
setSendViewDistance
in interfaceWorld
-
spigot
-
getGameTime
public long getGameTime()- Specified by:
getGameTime
in interfaceWorld
-
getSimulationDistance
public int getSimulationDistance()- Specified by:
getSimulationDistance
in interfaceWorld
-
getPersistentDataContainer
- Specified by:
getPersistentDataContainer
in interfacePersistentDataHolder
-
getTicksPerSpawns
- Specified by:
getTicksPerSpawns
in interfaceWorld
-
setTicksPerSpawns
public void setTicksPerSpawns(@NotNull @NotNull SpawnCategory spawnCategory, int ticksPerCategorySpawn) - Specified by:
setTicksPerSpawns
in interfaceWorld
-
getSpawnLimit
- Specified by:
getSpawnLimit
in interfaceWorld
-
setSpawnLimit
- Specified by:
setSpawnLimit
in interfaceWorld
-
getKey
- Specified by:
getKey
in interfaceKeyed
- Specified by:
getKey
in interfaceRegionAccessor
-