From 0b7fbcde5373914603810a6d2f706d2933a9c865 Mon Sep 17 00:00:00 2001 From: roland-a <91647122+roland-a@users.noreply.github.com> Date: Thu, 29 Sep 2022 13:49:02 -0400 Subject: [PATCH] Send block updates to client when the turtle moves #1167 (#1170) Fixes #1167 --- .../dan200/computercraft/shared/turtle/core/TurtleBrain.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/dan200/computercraft/shared/turtle/core/TurtleBrain.java b/src/main/java/dan200/computercraft/shared/turtle/core/TurtleBrain.java index 2a3887b8a..ba336e923 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/core/TurtleBrain.java +++ b/src/main/java/dan200/computercraft/shared/turtle/core/TurtleBrain.java @@ -323,8 +323,9 @@ public class TurtleBrain implements ITurtleAccess try { - // Create a new turtle - if( world.setBlock( pos, newState, 0 ) ) + // We use Block.UPDATE_CLIENTS here to ensure that neighbour updates caused in Block.updateNeighbourShapes + // are sent to the client. We want to avoid doing a full block update until the turtle state is copied over. + if( world.setBlock( pos, newState, 2 ) ) { Block block = world.getBlockState( pos ).getBlock(); if( block == oldBlock.getBlock() )