Package org.cloudburstmc.server.level
Class CloudLevel
java.lang.Object
org.cloudburstmc.server.level.CloudLevel
- All Implemented Interfaces:
org.cloudburstmc.api.level.ChunkManager,org.cloudburstmc.api.level.Level
author: MagicDroidX Nukkit Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intstatic intstatic intstatic intfloatintintintFields inherited from interface org.cloudburstmc.api.level.Level
BLOCK_UPDATE_NORMAL, BLOCK_UPDATE_RANDOM, BLOCK_UPDATE_REDSTONE, BLOCK_UPDATE_SCHEDULED, BLOCK_UPDATE_TICK, BLOCK_UPDATE_TOUCH, BLOCK_UPDATE_WEAK, TIME_DAY, TIME_FULL, TIME_MIDNIGHT, TIME_NIGHT, TIME_NOON, TIME_SUNRISE, TIME_SUNSET -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity blockEntity)voidaddChunkPacket(int chunkX, int chunkZ, com.nukkitx.protocol.bedrock.BedrockPacket packet)voidaddChunkPacket(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.BedrockPacket packet)voidaddChunkPacket(com.nukkitx.math.vector.Vector3i pos, com.nukkitx.protocol.bedrock.BedrockPacket packet)voidaddEntity(org.cloudburstmc.api.entity.Entity entity)voidaddEntityMovement(org.cloudburstmc.api.entity.Entity entity, double x, double y, double z, double yaw, double pitch, double headYaw)voidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event)voidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data)Broadcasts sound to playersvoidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data, org.cloudburstmc.api.entity.EntityType<?> type)voidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data, org.cloudburstmc.api.entity.EntityType<?> type, boolean isBaby, boolean isGlobal)voidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data, org.cloudburstmc.api.util.Identifier identifier, boolean isBaby, boolean isGlobal)voidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3i pos, com.nukkitx.protocol.bedrock.data.SoundEvent event)voidaddLevelSoundEvent(com.nukkitx.math.vector.Vector3i pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data)voidaddLightUpdate(int x, int y, int z)voidaddParticle(Particle particle)voidaddParticle(Particle particle, Collection<org.cloudburstmc.api.player.Player> players)voidaddParticle(Particle particle, org.cloudburstmc.api.player.Player player)voidaddParticle(Particle particle, org.cloudburstmc.api.player.Player[] players)voidaddParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier)voidaddParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId)voidaddParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId, int dimensionId)voidaddParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId, int dimensionId, Collection<org.cloudburstmc.api.player.Player> players)voidaddParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId, int dimensionId, org.cloudburstmc.api.player.Player... players)voidvoidvoidaddSound(com.nukkitx.math.vector.Vector3f pos, Sound sound, float volume, float pitch, Collection<org.cloudburstmc.api.player.Player> players)voidaddSound(com.nukkitx.math.vector.Vector3f pos, Sound sound, float volume, float pitch, org.cloudburstmc.api.player.Player... players)voidvoidcom.nukkitx.math.vector.Vector3fadjustPosToNearbyEntity(com.nukkitx.math.vector.Vector3f pos)floatcalculateCelestialAngle(int time, float tickDiff)intcalculateSkylightSubtracted(float tickDiff)booleancanBlockSeeSky(int x, int y, int z)booleancanBlockSeeSky(com.nukkitx.math.vector.Vector3f pos)booleancanBlockSeeSky(com.nukkitx.math.vector.Vector3i pos)booleancancelScheduledUpdate(com.nukkitx.math.vector.Vector3i pos)voidvoidvoidclose()voidvoiddoTick(int currentTick)voiddropExpOrb(com.nukkitx.math.vector.Vector3f source, int exp)voiddropExpOrb(com.nukkitx.math.vector.Vector3f source, int exp, com.nukkitx.math.vector.Vector3f motion)voiddropExpOrb(com.nukkitx.math.vector.Vector3f source, int exp, com.nukkitx.math.vector.Vector3f motion, int delay)voiddropExpOrb(com.nukkitx.math.vector.Vector3i source, int exp)org.cloudburstmc.api.entity.misc.DroppedItemdropItem(com.nukkitx.math.vector.Vector3f source, org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f motion, boolean dropAround, int delay)booleanintgetBiomeId(int x, int z)org.cloudburstmc.api.block.BlockgetBlock(int x, int y, int z)Set<org.cloudburstmc.api.blockentity.BlockEntity>org.cloudburstmc.api.blockentity.BlockEntitygetBlockEntity(com.nukkitx.math.vector.Vector3i pos)intgetBlockLightAt(int x, int y, int z)org.cloudburstmc.api.block.BlockStategetBlockState(int x, int y, int z, int layer)getChunk(int chunkX, int chunkZ)getChunk(long chunkKey)getChunk(com.nukkitx.math.vector.Vector3f pos)getChunk(com.nukkitx.math.vector.Vector3i pos)getChunkBlockEntities(int chunkX, int chunkZ)intgetChunkEntities(int chunkX, int chunkZ)getChunkFuture(int chunkX, int chunkZ)Set<org.cloudburstmc.api.level.ChunkLoader>getChunkLoaders(int chunkX, int chunkZ)getChunkPlayers(int chunkX, int chunkZ)Set<org.cloudburstmc.api.entity.Entity>getCollidingEntities(org.cloudburstmc.api.util.AxisAlignedBB bb)Set<org.cloudburstmc.api.entity.Entity>getCollidingEntities(org.cloudburstmc.api.util.AxisAlignedBB bb, org.cloudburstmc.api.entity.Entity entity)org.cloudburstmc.api.block.Block[]getCollisionBlocks(org.cloudburstmc.api.util.AxisAlignedBB bb)org.cloudburstmc.api.block.Block[]getCollisionBlocks(org.cloudburstmc.api.util.AxisAlignedBB bb, boolean targetFirst)org.cloudburstmc.api.util.AxisAlignedBB[]getCollisionCubes(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb)org.cloudburstmc.api.util.AxisAlignedBB[]getCollisionCubes(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb, boolean entities)org.cloudburstmc.api.util.AxisAlignedBB[]getCollisionCubes(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb, boolean entities, boolean solidEntities)longintorg.cloudburstmc.api.entity.Entity[]org.cloudburstmc.api.entity.EntitygetEntity(long entityId)intgetFullLight(com.nukkitx.math.vector.Vector3i pos)org.cloudburstmc.api.level.gamerule.GameRuleMapintgetHighestBlock(int x, int z)intgetHighestBlockAt(int x, int z)getId()org.cloudburstmc.api.block.BlockgetLoadedBlock(int x, int y, int z)getLoadedBlockEntities(int chunkX, int chunkZ)org.cloudburstmc.api.blockentity.BlockEntitygetLoadedBlockEntity(com.nukkitx.math.vector.Vector3i pos)getLoadedChunk(int chunkX, int chunkZ)getLoadedChunk(long chunkKey)getLoadedChunk(com.nukkitx.math.vector.Vector3f pos)getLoadedChunk(com.nukkitx.math.vector.Vector3i pos)getLoadedChunkEntities(int chunkX, int chunkZ)org.cloudburstmc.api.util.data.BlockColorgetMapColorAt(int x, int z)intgetMoonPhase(long worldTime)getName()Set<org.cloudburstmc.api.entity.Entity>getNearbyEntities(org.cloudburstmc.api.util.AxisAlignedBB bb)Set<org.cloudburstmc.api.entity.Entity>getNearbyEntities(org.cloudburstmc.api.util.AxisAlignedBB bb, org.cloudburstmc.api.entity.Entity entity)Set<org.cloudburstmc.api.entity.Entity>getNearbyEntities(org.cloudburstmc.api.util.AxisAlignedBB bb, org.cloudburstmc.api.entity.Entity entity, boolean loadChunks)getPendingBlockUpdates(org.cloudburstmc.api.util.AxisAlignedBB boundingBox)getPendingBlockUpdates(CloudChunk chunk)intintgetRedstonePower(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face)org.cloudburstmc.api.level.Locationorg.cloudburstmc.api.level.LocationgetSafeSpawn(org.cloudburstmc.api.level.Location pos)longgetSeed()intgetSkyLightAt(int x, int y, int z)com.nukkitx.math.vector.Vector3fintgetStrongPower(com.nukkitx.math.vector.Vector3i pos)intgetStrongPower(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction direction)intintintintgetTime()intbooleanhasCollision(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb, boolean entities)voidinit()booleanisAreaLoaded(org.cloudburstmc.api.util.AxisAlignedBB bb)intisBlockIndirectlyGettingPowered(com.nukkitx.math.vector.Vector3i pos)booleanisBlockPowered(com.nukkitx.math.vector.Vector3i pos)booleanisBlockTickPending(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.block.Block block)booleanisChunkLoaded(int x, int z)booleanisChunkLoaded(com.nukkitx.math.vector.Vector3i pos)booleanisChunkLoaded(com.nukkitx.math.vector.Vector4i pos)booleanbooleanisFullBlock(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.block.BlockState state)booleanisInSpawnRadius(com.nukkitx.math.vector.Vector3i vector3)booleanbooleanisSidePowered(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face)booleanisSpawnChunk(int x, int z)booleanbooleanisUpdateScheduled(com.nukkitx.math.vector.Vector3i pos)voidvoidremoveBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity entity)voidremoveEntity(org.cloudburstmc.api.entity.Entity entity)booleansave()booleansave(boolean force)voidscheduleBlockEntityUpdate(org.cloudburstmc.api.blockentity.BlockEntity entity)voidscheduleEntityUpdate(org.cloudburstmc.api.entity.Entity entity)voidscheduleUpdate(com.nukkitx.math.vector.Vector3i pos, int delay)voidscheduleUpdate(org.cloudburstmc.api.block.Block block, int delay)voidscheduleUpdate(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, int delay)voidscheduleUpdate(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, int delay, int priority)voidscheduleUpdate(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, int delay, int priority, boolean checkArea)voidscheduleUpdate(BlockUpdate blockUpdate)voidsendBlocks(org.cloudburstmc.api.player.Player[] target, org.cloudburstmc.api.block.Block[] blocks)voidsendBlocks(org.cloudburstmc.api.player.Player[] target, org.cloudburstmc.api.block.Block[] blocks, Set<com.nukkitx.protocol.bedrock.packet.UpdateBlockPacket.Flag> flags)voidsendBlocks(org.cloudburstmc.api.player.Player[] target, org.cloudburstmc.api.block.Block[] blocks, Set<com.nukkitx.protocol.bedrock.packet.UpdateBlockPacket.Flag> flags, boolean optimizeRebuilds)voidsendTime()voidsendTime(org.cloudburstmc.api.player.Player... players)voidsendWeather(Collection<org.cloudburstmc.api.player.Player> players)voidsendWeather(org.cloudburstmc.api.player.Player player)voidsendWeather(org.cloudburstmc.api.player.Player[] toSend)voidsetAutoSave(boolean autoSave)voidsetBiomeId(int x, int z, byte biomeId)voidsetBlockLightAt(int x, int y, int z, int level)booleansetBlockState(int x, int y, int z, int layer, org.cloudburstmc.api.block.BlockState state, boolean direct, boolean update)booleansetRaining(boolean raining)voidsetRainTime(int rainTime)voidsetSeed(long seed)voidsetSkyLightAt(int x, int y, int z, int level)voidsetSpawnLocation(com.nukkitx.math.vector.Vector3f pos)booleansetThundering(boolean thundering)voidsetThunderTime(int thunderTime)voidsetTickRate(int tickRate)voidsetTime(int time)voidvoidstopTime()toString()booleanunload()booleanunload(boolean force)voidupdateAllLight(com.nukkitx.math.vector.Vector3f pos)voidupdateAround(int posX, int posY, int posZ)voidupdateAround(com.nukkitx.math.vector.Vector3i pos)voidupdateAroundRedstone(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face)voidupdateBlockLight(it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.shorts.ShortSet> map)voidupdateBlockSkyLight(int x, int y, int z)voidupdateComparatorOutputLevel(com.nukkitx.math.vector.Vector3i v)org.cloudburstmc.api.item.ItemStackuseBreakOn(com.nukkitx.math.vector.Vector3i pos)org.cloudburstmc.api.item.ItemStackuseBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.item.ItemStack item)org.cloudburstmc.api.item.ItemStackuseBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.player.Player player)org.cloudburstmc.api.item.ItemStackuseBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.player.Player player, boolean createParticles)org.cloudburstmc.api.item.ItemStackuseBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.player.Player player, boolean createParticles)org.cloudburstmc.api.item.ItemStackuseItemOn(com.nukkitx.math.vector.Vector3i vector, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos)org.cloudburstmc.api.item.ItemStackuseItemOn(com.nukkitx.math.vector.Vector3i vector, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.player.Player player)org.cloudburstmc.api.item.ItemStackuseItemOn(com.nukkitx.math.vector.Vector3i vector, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.player.Player player, boolean playSound)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudburstmc.api.level.ChunkManager
getBlock, getBlock, getBlockState, getBlockState, getBlockState, getBlockState, getChunk, getLoadedBlock, getLoadedBlock, setBlockState, setBlockState, setBlockState, setBlockState, setBlockState, setBlockState, setBlockState, setBlockState, setBlockState, setBlockStateMethods inherited from interface org.cloudburstmc.api.level.Level
dropItem, dropItem, dropItem, dropItem, dropItem, sendTime
-
Field Details
-
COMPRESSION_LEVEL
public static int COMPRESSION_LEVEL -
DIMENSION_OVERWORLD
public static final int DIMENSION_OVERWORLD- See Also:
- Constant Field Values
-
DIMENSION_NETHER
public static final int DIMENSION_NETHER- See Also:
- Constant Field Values
-
DIMENSION_THE_END
public static final int DIMENSION_THE_END- See Also:
- Constant Field Values
-
MAX_BLOCK_CACHE
public static final int MAX_BLOCK_CACHE- See Also:
- Constant Field Values
-
timings
-
skyLightSubtracted
public float skyLightSubtracted -
sleepTicks
public int sleepTicks -
tickRateTime
public int tickRateTime -
tickRateCounter
public int tickRateCounter
-
-
Method Details
-
reloadGenerator
public void reloadGenerator() -
getTickRate
public int getTickRate()- Specified by:
getTickRatein interfaceorg.cloudburstmc.api.level.Level
-
getTickRateTime
public int getTickRateTime() -
setTickRate
public void setTickRate(int tickRate) -
init
public void init()- Specified by:
initin interfaceorg.cloudburstmc.api.level.Level
-
getServer
- Specified by:
getServerin interfaceorg.cloudburstmc.api.level.Level
-
getProvider
-
getId
- Specified by:
getIdin interfaceorg.cloudburstmc.api.level.Level
-
close
public void close()- Specified by:
closein interfaceorg.cloudburstmc.api.level.Level
-
addSound
-
addSound
-
addSound
-
addSound
-
addSound
public void addSound(com.nukkitx.math.vector.Vector3f pos, Sound sound, float volume, float pitch, Collection<org.cloudburstmc.api.player.Player> players) -
addSound
public void addSound(com.nukkitx.math.vector.Vector3f pos, Sound sound, float volume, float pitch, org.cloudburstmc.api.player.Player... players) -
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data, org.cloudburstmc.api.entity.EntityType<?> type) -
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data, org.cloudburstmc.api.entity.EntityType<?> type, boolean isBaby, boolean isGlobal) -
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3i pos, com.nukkitx.protocol.bedrock.data.SoundEvent event) -
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event) -
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3i pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data) -
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data)Broadcasts sound to players- Parameters:
pos- position where sound should be playedevent- ID of the sound fromSoundEventdata- generic data that can affect sound
-
addParticle
-
addParticle
-
addParticle
-
addParticle
-
addParticleEffect
public void addParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier) -
addParticleEffect
public void addParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId) -
addParticleEffect
public void addParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId, int dimensionId) -
addParticleEffect
public void addParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId, int dimensionId, Collection<org.cloudburstmc.api.player.Player> players) -
addParticleEffect
public void addParticleEffect(com.nukkitx.math.vector.Vector3f pos, org.cloudburstmc.api.util.Identifier identifier, long uniqueEntityId, int dimensionId, org.cloudburstmc.api.player.Player... players) -
getAutoSave
public boolean getAutoSave() -
setAutoSave
public void setAutoSave(boolean autoSave) -
unload
public boolean unload()- Specified by:
unloadin interfaceorg.cloudburstmc.api.level.Level
-
unload
public boolean unload(boolean force)- Specified by:
unloadin interfaceorg.cloudburstmc.api.level.Level
-
getChunkPlayers
- Specified by:
getChunkPlayersin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunkLoaders
- Specified by:
getChunkLoadersin interfaceorg.cloudburstmc.api.level.ChunkManager
-
addLevelSoundEvent
public void addLevelSoundEvent(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.data.SoundEvent event, int data, org.cloudburstmc.api.util.Identifier identifier, boolean isBaby, boolean isGlobal) -
checkTime
public void checkTime() -
sendTime
public void sendTime(org.cloudburstmc.api.player.Player... players)- Specified by:
sendTimein interfaceorg.cloudburstmc.api.level.Level
-
sendTime
public void sendTime() -
getGameRules
public org.cloudburstmc.api.level.gamerule.GameRuleMap getGameRules()- Specified by:
getGameRulesin interfaceorg.cloudburstmc.api.level.Level
-
addChunkPacket
public void addChunkPacket(com.nukkitx.math.vector.Vector3i pos, com.nukkitx.protocol.bedrock.BedrockPacket packet) -
addChunkPacket
public void addChunkPacket(com.nukkitx.math.vector.Vector3f pos, com.nukkitx.protocol.bedrock.BedrockPacket packet) -
addChunkPacket
public void addChunkPacket(int chunkX, int chunkZ, com.nukkitx.protocol.bedrock.BedrockPacket packet) -
doTick
public void doTick(int currentTick)- Specified by:
doTickin interfaceorg.cloudburstmc.api.level.Level
-
checkSleep
public void checkSleep() -
adjustPosToNearbyEntity
public com.nukkitx.math.vector.Vector3f adjustPosToNearbyEntity(com.nukkitx.math.vector.Vector3f pos) -
sendBlocks
public void sendBlocks(org.cloudburstmc.api.player.Player[] target, org.cloudburstmc.api.block.Block[] blocks) -
sendBlocks
public void sendBlocks(org.cloudburstmc.api.player.Player[] target, org.cloudburstmc.api.block.Block[] blocks, Set<com.nukkitx.protocol.bedrock.packet.UpdateBlockPacket.Flag> flags) -
sendBlocks
public void sendBlocks(org.cloudburstmc.api.player.Player[] target, org.cloudburstmc.api.block.Block[] blocks, Set<com.nukkitx.protocol.bedrock.packet.UpdateBlockPacket.Flag> flags, boolean optimizeRebuilds) -
save
public boolean save()- Specified by:
savein interfaceorg.cloudburstmc.api.level.Level
-
save
public boolean save(boolean force)- Specified by:
savein interfaceorg.cloudburstmc.api.level.Level
-
saveChunks
-
updateAroundRedstone
public void updateAroundRedstone(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face) -
updateComparatorOutputLevel
public void updateComparatorOutputLevel(com.nukkitx.math.vector.Vector3i v) -
updateAround
public void updateAround(int posX, int posY, int posZ) -
scheduleUpdate
public void scheduleUpdate(com.nukkitx.math.vector.Vector3i pos, int delay)- Specified by:
scheduleUpdatein interfaceorg.cloudburstmc.api.level.Level
-
scheduleUpdate
public void scheduleUpdate(org.cloudburstmc.api.block.Block block, int delay) -
updateAround
public void updateAround(com.nukkitx.math.vector.Vector3i pos)- Specified by:
updateAroundin interfaceorg.cloudburstmc.api.level.Level
-
scheduleUpdate
public void scheduleUpdate(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, int delay) -
scheduleUpdate
-
scheduleUpdate
public void scheduleUpdate(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, int delay, int priority) -
scheduleUpdate
public void scheduleUpdate(org.cloudburstmc.api.block.Block block, com.nukkitx.math.vector.Vector3i pos, int delay, int priority, boolean checkArea) -
cancelScheduledUpdate
public boolean cancelScheduledUpdate(com.nukkitx.math.vector.Vector3i pos)- Specified by:
cancelScheduledUpdatein interfaceorg.cloudburstmc.api.level.Level
-
isUpdateScheduled
public boolean isUpdateScheduled(com.nukkitx.math.vector.Vector3i pos)- Specified by:
isUpdateScheduledin interfaceorg.cloudburstmc.api.level.Level
-
getPendingBlockUpdates
-
getPendingBlockUpdates
public Set<BlockUpdateEntry> getPendingBlockUpdates(org.cloudburstmc.api.util.AxisAlignedBB boundingBox) -
getCollisionBlocks
public org.cloudburstmc.api.block.Block[] getCollisionBlocks(org.cloudburstmc.api.util.AxisAlignedBB bb)- Specified by:
getCollisionBlocksin interfaceorg.cloudburstmc.api.level.Level
-
getCollisionBlocks
public org.cloudburstmc.api.block.Block[] getCollisionBlocks(org.cloudburstmc.api.util.AxisAlignedBB bb, boolean targetFirst) -
isBlockTickPending
public boolean isBlockTickPending(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.block.Block block) -
getCollisionCubes
public org.cloudburstmc.api.util.AxisAlignedBB[] getCollisionCubes(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb)- Specified by:
getCollisionCubesin interfaceorg.cloudburstmc.api.level.Level
-
getCollisionCubes
public org.cloudburstmc.api.util.AxisAlignedBB[] getCollisionCubes(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb, boolean entities)- Specified by:
getCollisionCubesin interfaceorg.cloudburstmc.api.level.Level
-
getCollisionCubes
public org.cloudburstmc.api.util.AxisAlignedBB[] getCollisionCubes(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb, boolean entities, boolean solidEntities)- Specified by:
getCollisionCubesin interfaceorg.cloudburstmc.api.level.Level
-
isFullBlock
public boolean isFullBlock(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.block.BlockState state) -
hasCollision
public boolean hasCollision(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.AxisAlignedBB bb, boolean entities)- Specified by:
hasCollisionin interfaceorg.cloudburstmc.api.level.Level
-
calculateSkylightSubtracted
public int calculateSkylightSubtracted(float tickDiff) -
calculateCelestialAngle
public float calculateCelestialAngle(int time, float tickDiff) -
getMoonPhase
public int getMoonPhase(long worldTime) -
getFullLight
public int getFullLight(com.nukkitx.math.vector.Vector3i pos)- Specified by:
getFullLightin interfaceorg.cloudburstmc.api.level.Level
-
getLoadedBlock
@Nullable public org.cloudburstmc.api.block.Block getLoadedBlock(int x, int y, int z)- Specified by:
getLoadedBlockin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getBlock
@Nonnull public org.cloudburstmc.api.block.Block getBlock(int x, int y, int z)- Specified by:
getBlockin interfaceorg.cloudburstmc.api.level.ChunkManager
-
updateBlockSkyLight
public void updateBlockSkyLight(int x, int y, int z) -
updateAllLight
public void updateAllLight(com.nukkitx.math.vector.Vector3f pos) -
updateBlockLight
public void updateBlockLight(it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.shorts.ShortSet> map) -
addLightUpdate
public void addLightUpdate(int x, int y, int z) -
setBlockState
public boolean setBlockState(int x, int y, int z, int layer, org.cloudburstmc.api.block.BlockState state, boolean direct, boolean update)- Specified by:
setBlockStatein interfaceorg.cloudburstmc.api.level.ChunkManager
-
dropItem
@Nonnull public org.cloudburstmc.api.entity.misc.DroppedItem dropItem(com.nukkitx.math.vector.Vector3f source, org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f motion, boolean dropAround, int delay)- Specified by:
dropItemin interfaceorg.cloudburstmc.api.level.Level
-
useBreakOn
public org.cloudburstmc.api.item.ItemStack useBreakOn(com.nukkitx.math.vector.Vector3i pos)- Specified by:
useBreakOnin interfaceorg.cloudburstmc.api.level.Level
-
useBreakOn
public org.cloudburstmc.api.item.ItemStack useBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.item.ItemStack item)- Specified by:
useBreakOnin interfaceorg.cloudburstmc.api.level.Level
-
useBreakOn
public org.cloudburstmc.api.item.ItemStack useBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.player.Player player)- Specified by:
useBreakOnin interfaceorg.cloudburstmc.api.level.Level
-
useBreakOn
public org.cloudburstmc.api.item.ItemStack useBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.player.Player player, boolean createParticles)- Specified by:
useBreakOnin interfaceorg.cloudburstmc.api.level.Level
-
useBreakOn
public org.cloudburstmc.api.item.ItemStack useBreakOn(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.player.Player player, boolean createParticles)- Specified by:
useBreakOnin interfaceorg.cloudburstmc.api.level.Level
-
dropExpOrb
public void dropExpOrb(com.nukkitx.math.vector.Vector3i source, int exp) -
dropExpOrb
public void dropExpOrb(com.nukkitx.math.vector.Vector3f source, int exp) -
dropExpOrb
public void dropExpOrb(com.nukkitx.math.vector.Vector3f source, int exp, com.nukkitx.math.vector.Vector3f motion) -
dropExpOrb
public void dropExpOrb(com.nukkitx.math.vector.Vector3f source, int exp, com.nukkitx.math.vector.Vector3f motion, int delay) -
useItemOn
public org.cloudburstmc.api.item.ItemStack useItemOn(com.nukkitx.math.vector.Vector3i vector, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos)- Specified by:
useItemOnin interfaceorg.cloudburstmc.api.level.Level
-
useItemOn
public org.cloudburstmc.api.item.ItemStack useItemOn(com.nukkitx.math.vector.Vector3i vector, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.player.Player player)- Specified by:
useItemOnin interfaceorg.cloudburstmc.api.level.Level
-
useItemOn
public org.cloudburstmc.api.item.ItemStack useItemOn(com.nukkitx.math.vector.Vector3i vector, org.cloudburstmc.api.item.ItemStack item, org.cloudburstmc.api.util.Direction face, com.nukkitx.math.vector.Vector3f clickPos, org.cloudburstmc.api.player.Player player, boolean playSound)- Specified by:
useItemOnin interfaceorg.cloudburstmc.api.level.Level
-
isInSpawnRadius
public boolean isInSpawnRadius(com.nukkitx.math.vector.Vector3i vector3) -
getEntity
public org.cloudburstmc.api.entity.Entity getEntity(long entityId)- Specified by:
getEntityin interfaceorg.cloudburstmc.api.level.Level
-
getEntities
public org.cloudburstmc.api.entity.Entity[] getEntities() -
getCollidingEntities
public Set<org.cloudburstmc.api.entity.Entity> getCollidingEntities(org.cloudburstmc.api.util.AxisAlignedBB bb)- Specified by:
getCollidingEntitiesin interfaceorg.cloudburstmc.api.level.Level
-
getCollidingEntities
public Set<org.cloudburstmc.api.entity.Entity> getCollidingEntities(org.cloudburstmc.api.util.AxisAlignedBB bb, org.cloudburstmc.api.entity.Entity entity)- Specified by:
getCollidingEntitiesin interfaceorg.cloudburstmc.api.level.Level
-
getNearbyEntities
public Set<org.cloudburstmc.api.entity.Entity> getNearbyEntities(org.cloudburstmc.api.util.AxisAlignedBB bb)- Specified by:
getNearbyEntitiesin interfaceorg.cloudburstmc.api.level.Level
-
getNearbyEntities
public Set<org.cloudburstmc.api.entity.Entity> getNearbyEntities(org.cloudburstmc.api.util.AxisAlignedBB bb, org.cloudburstmc.api.entity.Entity entity)- Specified by:
getNearbyEntitiesin interfaceorg.cloudburstmc.api.level.Level
-
getNearbyEntities
public Set<org.cloudburstmc.api.entity.Entity> getNearbyEntities(org.cloudburstmc.api.util.AxisAlignedBB bb, org.cloudburstmc.api.entity.Entity entity, boolean loadChunks)- Specified by:
getNearbyEntitiesin interfaceorg.cloudburstmc.api.level.Level
-
getBlockEntities
-
getPlayers
- Specified by:
getPlayersin interfaceorg.cloudburstmc.api.level.Level
-
getLoaders
-
getBlockEntity
public org.cloudburstmc.api.blockentity.BlockEntity getBlockEntity(com.nukkitx.math.vector.Vector3i pos)- Specified by:
getBlockEntityin interfaceorg.cloudburstmc.api.level.Level
-
getLoadedBlockEntity
@Nullable public org.cloudburstmc.api.blockentity.BlockEntity getLoadedBlockEntity(com.nukkitx.math.vector.Vector3i pos) -
getChunkEntities
-
getLoadedChunkEntities
-
getChunkBlockEntities
-
getLoadedBlockEntities
-
getBlockState
public org.cloudburstmc.api.block.BlockState getBlockState(int x, int y, int z, int layer)- Specified by:
getBlockStatein interfaceorg.cloudburstmc.api.level.ChunkManager
-
getBiomeId
public int getBiomeId(int x, int z)- Specified by:
getBiomeIdin interfaceorg.cloudburstmc.api.level.Level
-
setBiomeId
public void setBiomeId(int x, int z, byte biomeId)- Specified by:
setBiomeIdin interfaceorg.cloudburstmc.api.level.Level
-
getSkyLightAt
public int getSkyLightAt(int x, int y, int z) -
setSkyLightAt
public void setSkyLightAt(int x, int y, int z, int level) -
getBlockLightAt
public int getBlockLightAt(int x, int y, int z) -
setBlockLightAt
public void setBlockLightAt(int x, int y, int z, int level) -
getHighestBlock
public int getHighestBlock(int x, int z)- Specified by:
getHighestBlockin interfaceorg.cloudburstmc.api.level.Level
-
getLoadedChunk
- Specified by:
getLoadedChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getLoadedChunk
- Specified by:
getLoadedChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getLoadedChunk
- Specified by:
getLoadedChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getLoadedChunk
- Specified by:
getLoadedChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunks
- Specified by:
getChunksin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunkCount
public int getChunkCount() -
getChunk
- Specified by:
getChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunk
- Specified by:
getChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunk
- Specified by:
getChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunk
- Specified by:
getChunkin interfaceorg.cloudburstmc.api.level.ChunkManager
-
getChunkFuture
- Specified by:
getChunkFuturein interfaceorg.cloudburstmc.api.level.ChunkManager
-
getHighestBlockAt
public int getHighestBlockAt(int x, int z) -
getMapColorAt
public org.cloudburstmc.api.util.data.BlockColor getMapColorAt(int x, int z) -
isChunkLoaded
public boolean isChunkLoaded(com.nukkitx.math.vector.Vector4i pos) -
isChunkLoaded
public boolean isChunkLoaded(com.nukkitx.math.vector.Vector3i pos) -
isChunkLoaded
public boolean isChunkLoaded(int x, int z) -
getSpawnLocation
public com.nukkitx.math.vector.Vector3f getSpawnLocation()- Specified by:
getSpawnLocationin interfaceorg.cloudburstmc.api.level.Level
-
setSpawnLocation
public void setSpawnLocation(com.nukkitx.math.vector.Vector3f pos)- Specified by:
setSpawnLocationin interfaceorg.cloudburstmc.api.level.Level
-
scheduleEntityUpdate
public void scheduleEntityUpdate(org.cloudburstmc.api.entity.Entity entity)- Specified by:
scheduleEntityUpdatein interfaceorg.cloudburstmc.api.level.Level
-
removeEntity
public void removeEntity(org.cloudburstmc.api.entity.Entity entity)- Specified by:
removeEntityin interfaceorg.cloudburstmc.api.level.Level
-
addEntity
public void addEntity(org.cloudburstmc.api.entity.Entity entity)- Specified by:
addEntityin interfaceorg.cloudburstmc.api.level.Level
-
addBlockEntity
public void addBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity blockEntity) -
scheduleBlockEntityUpdate
public void scheduleBlockEntityUpdate(org.cloudburstmc.api.blockentity.BlockEntity entity) -
removeBlockEntity
public void removeBlockEntity(org.cloudburstmc.api.blockentity.BlockEntity entity) -
isSpawnChunk
public boolean isSpawnChunk(int x, int z) -
getSafeSpawn
public org.cloudburstmc.api.level.Location getSafeSpawn() -
getSafeSpawn
public org.cloudburstmc.api.level.Location getSafeSpawn(org.cloudburstmc.api.level.Location pos) -
getTime
public int getTime()- Specified by:
getTimein interfaceorg.cloudburstmc.api.level.Level
-
isDaytime
public boolean isDaytime() -
setTime
public void setTime(int time)- Specified by:
setTimein interfaceorg.cloudburstmc.api.level.Level
-
getCurrentTick
public long getCurrentTick()- Specified by:
getCurrentTickin interfaceorg.cloudburstmc.api.level.Level
-
getName
- Specified by:
getNamein interfaceorg.cloudburstmc.api.level.Level
-
stopTime
public void stopTime()- Specified by:
stopTimein interfaceorg.cloudburstmc.api.level.Level
-
startTime
public void startTime()- Specified by:
startTimein interfaceorg.cloudburstmc.api.level.Level
-
getSeed
public long getSeed()- Specified by:
getSeedin interfaceorg.cloudburstmc.api.level.ChunkManager- Specified by:
getSeedin interfaceorg.cloudburstmc.api.level.Level
-
setSeed
public void setSeed(long seed)- Specified by:
setSeedin interfaceorg.cloudburstmc.api.level.Level
-
doChunkGarbageCollection
public void doChunkGarbageCollection() -
addEntityMovement
public void addEntityMovement(org.cloudburstmc.api.entity.Entity entity, double x, double y, double z, double yaw, double pitch, double headYaw)- Specified by:
addEntityMovementin interfaceorg.cloudburstmc.api.level.Level
-
isRaining
public boolean isRaining()- Specified by:
isRainingin interfaceorg.cloudburstmc.api.level.Level
-
setRaining
public boolean setRaining(boolean raining)- Specified by:
setRainingin interfaceorg.cloudburstmc.api.level.Level
-
getRainTime
public int getRainTime()- Specified by:
getRainTimein interfaceorg.cloudburstmc.api.level.Level
-
setRainTime
public void setRainTime(int rainTime)- Specified by:
setRainTimein interfaceorg.cloudburstmc.api.level.Level
-
isThundering
public boolean isThundering()- Specified by:
isThunderingin interfaceorg.cloudburstmc.api.level.Level
-
setThundering
public boolean setThundering(boolean thundering)- Specified by:
setThunderingin interfaceorg.cloudburstmc.api.level.Level
-
getThunderTime
public int getThunderTime()- Specified by:
getThunderTimein interfaceorg.cloudburstmc.api.level.Level
-
setThunderTime
public void setThunderTime(int thunderTime)- Specified by:
setThunderTimein interfaceorg.cloudburstmc.api.level.Level
-
sendWeather
public void sendWeather(org.cloudburstmc.api.player.Player[] toSend)- Specified by:
sendWeatherin interfaceorg.cloudburstmc.api.level.Level
-
sendWeather
public void sendWeather(org.cloudburstmc.api.player.Player player) -
sendWeather
-
getDimension
public int getDimension() -
canBlockSeeSky
public boolean canBlockSeeSky(com.nukkitx.math.vector.Vector3f pos) -
canBlockSeeSky
public boolean canBlockSeeSky(com.nukkitx.math.vector.Vector3i pos)- Specified by:
canBlockSeeSkyin interfaceorg.cloudburstmc.api.level.Level
-
canBlockSeeSky
public boolean canBlockSeeSky(int x, int y, int z) -
getStrongPower
public int getStrongPower(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction direction) -
getStrongPower
public int getStrongPower(com.nukkitx.math.vector.Vector3i pos) -
isSidePowered
public boolean isSidePowered(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face) -
getRedstonePower
public int getRedstonePower(com.nukkitx.math.vector.Vector3i pos, org.cloudburstmc.api.util.Direction face) -
isBlockPowered
public boolean isBlockPowered(com.nukkitx.math.vector.Vector3i pos) -
isBlockIndirectlyGettingPowered
public int isBlockIndirectlyGettingPowered(com.nukkitx.math.vector.Vector3i pos) -
isAreaLoaded
public boolean isAreaLoaded(org.cloudburstmc.api.util.AxisAlignedBB bb) -
getUpdateLCG
public int getUpdateLCG() -
getGenerator
-
toString
-