Skip to content

Commit

Permalink
Allow client to unphase blocks to potentially resolve desync
Browse files Browse the repository at this point in the history
  • Loading branch information
ssblur committed Nov 20, 2024
1 parent 9f0991d commit 6bd3cd0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void tick() {
countdown--;
if(countdown <= 0 && level != null) {
level.setBlockAndUpdate(getBlockPos(), blockState);
if(data != null) {
if(data != null && !level.isClientSide) {
var entity = BlockEntity.loadStatic(getBlockPos(), blockState, data, level.registryAccess());
if(entity != null)
level.setBlockEntity(entity);
Expand All @@ -40,7 +40,6 @@ public void tick() {
}

public static <T extends BlockEntity> void tick(Level level, BlockPos pos, BlockState state, T entity) {
if(level.isClientSide) return;
if(entity instanceof PhasedBlockBlockEntity tile) tile.tick();
}

Expand Down

0 comments on commit 6bd3cd0

Please sign in to comment.