Package be.seeseemelk.mockbukkit
Class ChunkMock
java.lang.Object
be.seeseemelk.mockbukkit.ChunkMock
- All Implemented Interfaces:
PersistentDataViewHolder,Chunk,PersistentDataHolder
Mock implementation of a
Chunk.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.Chunk
Chunk.LoadLevel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPluginChunkTicket(@NotNull Plugin plugin) booleanbooleanboolean@NotNull BlockgetBlock(int x, int y, int z) @NotNull BlockgetBlock(@NotNull Coordinate coordinate) Gets a block at aCoordinate.Gets all blocks in this chunk.@NotNull ChunkSnapshot@NotNull ChunkSnapshotgetChunkSnapshot(boolean includeMaxblocky, boolean includeBiome, boolean includeBiomeTempRain) @NotNull ChunkSnapshotgetChunkSnapshot(boolean b, boolean b1, boolean b2, boolean b3) Entity[]long@NotNull Chunk.LoadLevel@NotNull PersistentDataContainer@NotNull Collection<Player> @NotNull Collection<Plugin> @NotNull Collection<GeneratedStructure> @NotNull Collection<GeneratedStructure> getStructures(@NotNull Structure structure) @NotNull BlockState[]getTileEntities(boolean useSnapshot) @NotNull Collection<BlockState> getTileEntities(@NotNull Predicate<? super Block> blockPredicate, boolean useSnapshot) @NotNull WorldgetWorld()intgetX()intgetZ()inthashCode()booleanbooleanbooleanbooleanisLoaded()booleanbooleanload()booleanload(boolean generate) booleanremovePluginChunkTicket(@NotNull Plugin plugin) voidsetForceLoaded(boolean forced) voidsetInhabitedTime(long ticks) voidsetSlimeChunk(boolean isSlimeChunk) Sets the return value ofisSlimeChunk().booleanunload()booleanunload(boolean save) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.Chunk
getChunkKey
-
Constructor Details
-
ChunkMock
Constructs a newChunkMockfor the provided world, at the specified coordinates.- Parameters:
world- The world the chunk is in.x- The X coordinate of the chunk.z- The Y coordinate of the chunk.
-
-
Method Details
-
getX
public int getX() -
getZ
public int getZ() -
isGenerated
public boolean isGenerated()- Specified by:
isGeneratedin interfaceChunk
-
getTileEntities
- Specified by:
getTileEntitiesin interfaceChunk
-
getTileEntities
@NotNull public @NotNull Collection<BlockState> getTileEntities(@NotNull @NotNull Predicate<? super Block> blockPredicate, boolean useSnapshot) - Specified by:
getTileEntitiesin interfaceChunk
-
getWorld
-
getBlock
-
getBlock
Gets a block at aCoordinate.- Parameters:
coordinate- The coordinate at which to get the block.- Returns:
- The block at the provided coordinate.
-
getBlocks
Gets all blocks in this chunk.- Returns:
- A list of all blocks in this chunk.
-
getChunkSnapshot
- Specified by:
getChunkSnapshotin interfaceChunk
-
getChunkSnapshot
@NotNull public @NotNull ChunkSnapshot getChunkSnapshot(boolean includeMaxblocky, boolean includeBiome, boolean includeBiomeTempRain) - Specified by:
getChunkSnapshotin interfaceChunk
-
getChunkSnapshot
@NotNull public @NotNull ChunkSnapshot getChunkSnapshot(boolean b, boolean b1, boolean b2, boolean b3) - Specified by:
getChunkSnapshotin interfaceChunk
-
isEntitiesLoaded
public boolean isEntitiesLoaded()- Specified by:
isEntitiesLoadedin interfaceChunk
-
getEntities
- Specified by:
getEntitiesin interfaceChunk
-
getTileEntities
- Specified by:
getTileEntitiesin interfaceChunk
-
isLoaded
public boolean isLoaded() -
load
public boolean load(boolean generate) -
load
public boolean load() -
unload
public boolean unload(boolean save) -
unload
public boolean unload() -
setSlimeChunk
public void setSlimeChunk(boolean isSlimeChunk) Sets the return value ofisSlimeChunk().- Parameters:
isSlimeChunk- Whether this is a slime chunk.
-
isSlimeChunk
public boolean isSlimeChunk()- Specified by:
isSlimeChunkin interfaceChunk
-
hashCode
public int hashCode() -
equals
-
isForceLoaded
public boolean isForceLoaded()- Specified by:
isForceLoadedin interfaceChunk
-
setForceLoaded
public void setForceLoaded(boolean forced) - Specified by:
setForceLoadedin interfaceChunk
-
addPluginChunkTicket
- Specified by:
addPluginChunkTicketin interfaceChunk
-
removePluginChunkTicket
- Specified by:
removePluginChunkTicketin interfaceChunk
-
getPluginChunkTickets
- Specified by:
getPluginChunkTicketsin interfaceChunk
-
getInhabitedTime
public long getInhabitedTime()- Specified by:
getInhabitedTimein interfaceChunk
-
setInhabitedTime
public void setInhabitedTime(long ticks) - Specified by:
setInhabitedTimein interfaceChunk
-
contains
-
contains
-
getLoadLevel
- Specified by:
getLoadLevelin interfaceChunk
-
getStructures
- Specified by:
getStructuresin interfaceChunk
-
getStructures
@NotNull public @NotNull Collection<GeneratedStructure> getStructures(@NotNull @NotNull Structure structure) - Specified by:
getStructuresin interfaceChunk
-
getPlayersSeeingChunk
- Specified by:
getPlayersSeeingChunkin interfaceChunk
-
getPersistentDataContainer
- Specified by:
getPersistentDataContainerin interfacePersistentDataHolder- Specified by:
getPersistentDataContainerin interfacePersistentDataViewHolder
-