--- a/net/minecraft/world/level/block/ObserverBlock.java
+++ b/net/minecraft/world/level/block/ObserverBlock.java
@@ -13,37 +13,49 @@
 import net.minecraft.world.level.block.state.StateDefinition;
 import net.minecraft.world.level.block.state.properties.BlockStateProperties;
 import net.minecraft.world.level.block.state.properties.BooleanProperty;
+import org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory; // CraftBukkit
 
 public class ObserverBlock extends DirectionalBlock {
+
     public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
 
     public ObserverBlock(BlockBehaviour.Properties settings) {
         super(settings);
-        this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.SOUTH).setValue(POWERED, Boolean.valueOf(false)));
+        this.registerDefaultState((BlockState) ((BlockState) ((BlockState) this.stateDefinition.any()).setValue(ObserverBlock.FACING, Direction.SOUTH)).setValue(ObserverBlock.POWERED, false));
     }
 
     @Override
     protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
-        builder.add(FACING, POWERED);
+        builder.add(ObserverBlock.FACING, ObserverBlock.POWERED);
     }
 
     @Override
     public BlockState rotate(BlockState state, Rotation rotation) {
-        return state.setValue(FACING, rotation.rotate(state.getValue(FACING)));
+        return (BlockState) state.setValue(ObserverBlock.FACING, rotation.rotate((Direction) state.getValue(ObserverBlock.FACING)));
     }
 
     @Override
     public BlockState mirror(BlockState state, Mirror mirror) {
-        return state.rotate(mirror.getRotation(state.getValue(FACING)));
+        return state.rotate(mirror.getRotation((Direction) state.getValue(ObserverBlock.FACING)));
     }
 
     @Override
     public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
-        if (state.getValue(POWERED)) {
-            world.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(false)), 2);
+        if ((Boolean) state.getValue(ObserverBlock.POWERED)) {
+            // CraftBukkit start
+            if (CraftEventFactory.callRedstoneChange(world, pos, 15, 0).getNewCurrent() != 0) {
+                return;
+            }
+            // CraftBukkit end
+            world.setBlock(pos, (BlockState) state.setValue(ObserverBlock.POWERED, false), 2);
         } else {
-            world.setBlock(pos, state.setValue(POWERED, Boolean.valueOf(true)), 2);
-            world.scheduleTick(pos, this, 2);
+            // CraftBukkit start
+            if (CraftEventFactory.callRedstoneChange(world, pos, 0, 15).getNewCurrent() != 15) {
+                return;
+            }
+            // CraftBukkit end
+            world.setBlock(pos, (BlockState) state.setValue(ObserverBlock.POWERED, true), 2);
+            world.scheduleTick(pos, (Block) this, 2);
         }
 
         this.updateNeighborsInFront(world, pos, state);
@@ -51,7 +63,7 @@
 
     @Override
     public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
-        if (state.getValue(FACING) == direction && !state.getValue(POWERED)) {
+        if (state.getValue(ObserverBlock.FACING) == direction && !(Boolean) state.getValue(ObserverBlock.POWERED)) {
             this.startSignal(world, pos);
         }
 
@@ -60,16 +72,17 @@
 
     private void startSignal(LevelAccessor world, BlockPos pos) {
         if (!world.isClientSide() && !world.getBlockTicks().hasScheduledTick(pos, this)) {
-            world.scheduleTick(pos, this, 2);
+            world.scheduleTick(pos, (Block) this, 2);
         }
 
     }
 
     protected void updateNeighborsInFront(Level world, BlockPos pos, BlockState state) {
-        Direction direction = state.getValue(FACING);
-        BlockPos blockPos = pos.relative(direction.getOpposite());
-        world.neighborChanged(blockPos, this, pos);
-        world.updateNeighborsAtExceptFromFacing(blockPos, this, direction);
+        Direction enumdirection = (Direction) state.getValue(ObserverBlock.FACING);
+        BlockPos blockposition1 = pos.relative(enumdirection.getOpposite());
+
+        world.neighborChanged(blockposition1, this, pos);
+        world.updateNeighborsAtExceptFromFacing(blockposition1, this, enumdirection);
     }
 
     @Override
@@ -84,16 +97,17 @@
 
     @Override
     public int getSignal(BlockState state, BlockGetter world, BlockPos pos, Direction direction) {
-        return state.getValue(POWERED) && state.getValue(FACING) == direction ? 15 : 0;
+        return (Boolean) state.getValue(ObserverBlock.POWERED) && state.getValue(ObserverBlock.FACING) == direction ? 15 : 0;
     }
 
     @Override
     public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
         if (!state.is(oldState.getBlock())) {
-            if (!world.isClientSide() && state.getValue(POWERED) && !world.getBlockTicks().hasScheduledTick(pos, this)) {
-                BlockState blockState = state.setValue(POWERED, Boolean.valueOf(false));
-                world.setBlock(pos, blockState, 18);
-                this.updateNeighborsInFront(world, pos, blockState);
+            if (!world.isClientSide() && (Boolean) state.getValue(ObserverBlock.POWERED) && !world.getBlockTicks().hasScheduledTick(pos, this)) {
+                BlockState iblockdata2 = (BlockState) state.setValue(ObserverBlock.POWERED, false);
+
+                world.setBlock(pos, iblockdata2, 18);
+                this.updateNeighborsInFront(world, pos, iblockdata2);
             }
 
         }
@@ -102,8 +116,8 @@
     @Override
     public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) {
         if (!state.is(newState.getBlock())) {
-            if (!world.isClientSide && state.getValue(POWERED) && world.getBlockTicks().hasScheduledTick(pos, this)) {
-                this.updateNeighborsInFront(world, pos, state.setValue(POWERED, Boolean.valueOf(false)));
+            if (!world.isClientSide && (Boolean) state.getValue(ObserverBlock.POWERED) && world.getBlockTicks().hasScheduledTick(pos, this)) {
+                this.updateNeighborsInFront(world, pos, (BlockState) state.setValue(ObserverBlock.POWERED, false));
             }
 
         }
@@ -111,6 +125,6 @@
 
     @Override
     public BlockState getStateForPlacement(BlockPlaceContext ctx) {
-        return this.defaultBlockState().setValue(FACING, ctx.getNearestLookingDirection().getOpposite().getOpposite());
+        return (BlockState) this.defaultBlockState().setValue(ObserverBlock.FACING, ctx.getNearestLookingDirection().getOpposite().getOpposite());
     }
 }
