use of net.minecraft.network.protocol.game.ClientboundLightUpdatePacket in project Denizen-For-Bukkit by DenizenScript.
the class BlockLightImpl method sendSingleChunkUpdate.
public static void sendSingleChunkUpdate(LevelChunk chunk) {
doNotCheck = true;
LevelLightEngine lightEngine = chunk.getLevel().getChunkSource().getLightEngine();
ChunkPos pos = chunk.getPos();
// TODO: 1.16: should 'trust edges' be true here?
ClientboundLightUpdatePacket packet = new ClientboundLightUpdatePacket(pos, lightEngine, null, null, true);
((ServerChunkCache) chunk.getLevel().getChunkSource()).chunkMap.getPlayers(pos, false).forEach((player) -> {
player.connection.send(packet);
});
doNotCheck = false;
}
use of net.minecraft.network.protocol.game.ClientboundLightUpdatePacket in project Denizen-For-Bukkit by DenizenScript.
the class BlockLightImpl method sendSingleChunkUpdate.
public static void sendSingleChunkUpdate(LevelChunk chunk) {
doNotCheck = true;
LevelLightEngine lightEngine = chunk.getLevel().getChunkSource().getLightEngine();
ChunkPos pos = chunk.getPos();
// TODO: 1.16: should 'trust edges' be true here?
ClientboundLightUpdatePacket packet = new ClientboundLightUpdatePacket(pos, lightEngine, null, null, true);
((ServerChunkCache) chunk.getLevel().getChunkSource()).chunkMap.getPlayers(pos, false).forEach((player) -> {
player.connection.send(packet);
});
doNotCheck = false;
}
Aggregations