--- a/net/minecraft/world/level/block/ObserverBlock.java
+++ b/net/minecraft/world/level/block/ObserverBlock.java
@@ -14,43 +14,55 @@
 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.event.CraftEventFactory; // CraftBukkit
 
 public class ObserverBlock extends DirectionalBlock {
+
     public static final MapCodec<ObserverBlock> CODEC = simpleCodec(ObserverBlock::new);
     public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
 
     @Override
     public MapCodec<ObserverBlock> codec() {
-        return CODEC;
+        return ObserverBlock.CODEC;
     }
 
     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
     protected 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
     protected 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
     protected 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);
@@ -58,7 +70,7 @@
 
     @Override
     protected 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);
         }
 
@@ -67,15 +79,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
@@ -90,31 +104,34 @@
 
     @Override
     protected 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
     protected 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);
             }
+
         }
     }
 
     @Override
     protected 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));
             }
+
         }
     }
 
     @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());
     }
 }
