use of thpmc.vanilla_source.api.world.parallel.ParallelChunk in project VanillaSource by TheHollowPlanetMC.
the class ImplParallelWorld method setSkyLightLevel.
@Override
public void setSkyLightLevel(int blockX, int blockY, int blockZ, int level) {
int chunkX = blockX >> 4;
int chunkZ = blockZ >> 4;
long coord = ChunkUtil.getCoordinateKey(chunkX, chunkZ);
ParallelChunk parallelChunk = chunkMap.computeIfAbsent(coord, c -> new ImplParallelChunk(this, chunkX, chunkZ));
parallelChunk.setSkyLightLevel(blockX, blockY, blockZ, level);
}
use of thpmc.vanilla_source.api.world.parallel.ParallelChunk in project VanillaSource by TheHollowPlanetMC.
the class ImplParallelWorld method getBlockData.
@Override
@Nullable
public BlockData getBlockData(int blockX, int blockY, int blockZ) {
int chunkX = blockX >> 4;
int chunkZ = blockZ >> 4;
long coord = ChunkUtil.getCoordinateKey(chunkX, chunkZ);
ParallelChunk parallelChunk = chunkMap.get(coord);
if (parallelChunk == null)
return null;
return parallelChunk.getBlockData(blockX, blockY, blockZ);
}
use of thpmc.vanilla_source.api.world.parallel.ParallelChunk in project VanillaSource by TheHollowPlanetMC.
the class ImplParallelWorld method setNMSBlockData.
@Override
public void setNMSBlockData(int blockX, int blockY, int blockZ, Object blockData) {
int chunkX = blockX >> 4;
int chunkZ = blockZ >> 4;
long coord = ChunkUtil.getCoordinateKey(chunkX, chunkZ);
ParallelChunk parallelChunk = chunkMap.computeIfAbsent(coord, c -> new ImplParallelChunk(this, chunkX, chunkZ));
parallelChunk.setNMSBlockData(blockX, blockY, blockZ, blockData);
}
use of thpmc.vanilla_source.api.world.parallel.ParallelChunk in project VanillaSource by TheHollowPlanetMC.
the class ImplParallelWorld method getSkyLightLevel.
@Override
public int getSkyLightLevel(int blockX, int blockY, int blockZ) {
int chunkX = blockX >> 4;
int chunkZ = blockZ >> 4;
long coord = ChunkUtil.getCoordinateKey(chunkX, chunkZ);
ParallelChunk parallelChunk = chunkMap.get(coord);
if (parallelChunk == null)
return 0;
return parallelChunk.getSkyLightLevel(blockX, blockY, blockZ);
}
use of thpmc.vanilla_source.api.world.parallel.ParallelChunk in project VanillaSource by TheHollowPlanetMC.
the class ImplParallelWorld method setBlockData.
@Override
public void setBlockData(int blockX, int blockY, int blockZ, BlockData blockData) {
int chunkX = blockX >> 4;
int chunkZ = blockZ >> 4;
long coord = ChunkUtil.getCoordinateKey(chunkX, chunkZ);
ParallelChunk parallelChunk = chunkMap.computeIfAbsent(coord, c -> new ImplParallelChunk(this, chunkX, chunkZ));
parallelChunk.setBlockData(blockX, blockY, blockZ, blockData);
}
Aggregations