Skip to content

Commit fd5ebc2

Browse files
committed
fixed setChamberCount not syncing to client, made it only setChamberCount on block update
1 parent 49f1a7e commit fd5ebc2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/org/gtreimagined/gt4r/reactor/tile/BlockEntityReactorCore.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,17 @@ public void setChamberCount(int chambers) {
114114
}
115115
}
116116
}
117+
sidedSync(true);
117118
}
118119

119120
@Override
120-
public void serverTick(Level level, BlockPos blockPos, BlockState blockState) {
121-
this.setChamberCount(getAttachedChambers(level, blockPos));
121+
public void onBlockUpdate(BlockPos pos) {
122+
super.onBlockUpdate(pos);
123+
this.setChamberCount(getAttachedChambers(level, this.getBlockPos()));
124+
}
122125

126+
@Override
127+
public void serverTick(Level level, BlockPos blockPos, BlockState blockState) {
123128
this.tickCounter++;
124129

125130
if (this.tickCounter % REACTOR_TICK_SPEED == 0) {

0 commit comments

Comments
 (0)