Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Moulberry committed Sep 28, 2023
1 parent f6cbe97 commit e68cbdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ private void applyBlockBuffer(ServerPlayer player, MinecraftServer server, Block
chunk.removeBlockEntity(blockPos);
}

// Mark block changed
world.getChunkSource().blockChanged(blockPos); // todo: maybe simply resend chunk instead of this?

// Update Light
if (LightEngine.hasDifferentLightProperties(chunk, blockPos, old, blockState)) {
chunk.getSkyLightSources().update(chunk, x, by, z);
lightEngine.checkBlock(blockPos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ public void onPluginMessageReceived(@NotNull String channel, @NotNull Player buk
chunk.removeBlockEntity(blockPos);
}

// Mark block changed
level.getChunkSource().blockChanged(blockPos);

// Update Light
if (LightEngine.hasDifferentLightProperties(chunk, blockPos, old, blockState)) {
chunk.getSkyLightSources().update(chunk, x, by, z);
level.getChunkSource().getLightEngine().checkBlock(blockPos);
Expand Down

0 comments on commit e68cbdb

Please sign in to comment.