Fix block state updates for tile-entity dependent block states.

This commit is contained in:
Sebastian Hartte
2020-06-14 21:41:25 +02:00
parent 0232e83196
commit 69c9407796
4 changed files with 8 additions and 34 deletions
@@ -66,12 +66,8 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock<TileQuantumBridge
}
@Override
public BlockState updatePostPlacement(BlockState state, Direction facing, BlockState facingState, IWorld world, BlockPos pos, BlockPos facingPos) {
TileQuantumBridge bridge = this.getTileEntity(world, pos);
if (bridge != null) {
state = state.with(FORMED, bridge.isFormed());
}
return state;
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileQuantumBridge te) {
return currentState.with(FORMED, te.isFormed());
}
@Override