--- a/net/minecraft/world/level/block/CeilingHangingSignBlock.java
+++ b/net/minecraft/world/level/block/CeilingHangingSignBlock.java
@@ -40,59 +40,41 @@
 import net.minecraft.world.phys.shapes.VoxelShape;
 
 public class CeilingHangingSignBlock extends SignBlock {
-    public static final MapCodec<CeilingHangingSignBlock> CODEC = RecordCodecBuilder.mapCodec(
-        instance -> instance.group(WoodType.CODEC.fieldOf("wood_type").forGetter(SignBlock::type), propertiesCodec())
-                .apply(instance, CeilingHangingSignBlock::new)
-    );
+
+    public static final MapCodec<CeilingHangingSignBlock> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
+        return instance.group(WoodType.CODEC.fieldOf("wood_type").forGetter(SignBlock::type), propertiesCodec()).apply(instance, CeilingHangingSignBlock::new);
+    });
     public static final IntegerProperty ROTATION = BlockStateProperties.ROTATION_16;
     public static final BooleanProperty ATTACHED = BlockStateProperties.ATTACHED;
     protected static final float AABB_OFFSET = 5.0F;
-    protected static final VoxelShape SHAPE = Block.box(3.0, 0.0, 3.0, 13.0, 16.0, 13.0);
-    private static final Map<Integer, VoxelShape> AABBS = Maps.newHashMap(
-        ImmutableMap.of(
-            0,
-            Block.box(1.0, 0.0, 7.0, 15.0, 10.0, 9.0),
-            4,
-            Block.box(7.0, 0.0, 1.0, 9.0, 10.0, 15.0),
-            8,
-            Block.box(1.0, 0.0, 7.0, 15.0, 10.0, 9.0),
-            12,
-            Block.box(7.0, 0.0, 1.0, 9.0, 10.0, 15.0)
-        )
-    );
+    protected static final VoxelShape SHAPE = Block.box(3.0D, 0.0D, 3.0D, 13.0D, 16.0D, 13.0D);
+    private static final Map<Integer, VoxelShape> AABBS = Maps.newHashMap(ImmutableMap.of(0, Block.box(1.0D, 0.0D, 7.0D, 15.0D, 10.0D, 9.0D), 4, Block.box(7.0D, 0.0D, 1.0D, 9.0D, 10.0D, 15.0D), 8, Block.box(1.0D, 0.0D, 7.0D, 15.0D, 10.0D, 9.0D), 12, Block.box(7.0D, 0.0D, 1.0D, 9.0D, 10.0D, 15.0D)));
 
     @Override
     public MapCodec<CeilingHangingSignBlock> codec() {
-        return CODEC;
+        return CeilingHangingSignBlock.CODEC;
     }
 
     public CeilingHangingSignBlock(WoodType type, BlockBehaviour.Properties settings) {
         super(type, settings.sound(type.hangingSignSoundType()));
-        this.registerDefaultState(
-            this.stateDefinition
-                .any()
-                .setValue(ROTATION, Integer.valueOf(0))
-                .setValue(ATTACHED, Boolean.valueOf(false))
-                .setValue(WATERLOGGED, Boolean.valueOf(false))
-        );
+        this.registerDefaultState((BlockState) ((BlockState) ((BlockState) ((BlockState) this.stateDefinition.any()).setValue(CeilingHangingSignBlock.ROTATION, 0)).setValue(CeilingHangingSignBlock.ATTACHED, false)).setValue(CeilingHangingSignBlock.WATERLOGGED, false));
     }
 
     @Override
-    protected ItemInteractionResult useItemOn(
-        ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit
-    ) {
-        if (world.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity
-            && this.shouldTryToChainAnotherHangingSign(player, hit, signBlockEntity, stack)) {
-            return ItemInteractionResult.SKIP_DEFAULT_BLOCK_INTERACTION;
+    protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
+        BlockEntity tileentity = world.getBlockEntity(pos);
+
+        if (tileentity instanceof SignBlockEntity tileentitysign) {
+            if (this.shouldTryToChainAnotherHangingSign(player, hit, tileentitysign, stack)) {
+                return ItemInteractionResult.SKIP_DEFAULT_BLOCK_INTERACTION;
+            }
         }
 
         return super.useItemOn(stack, state, world, pos, player, hand, hit);
     }
 
     private boolean shouldTryToChainAnotherHangingSign(Player player, BlockHitResult hitResult, SignBlockEntity sign, ItemStack stack) {
-        return !sign.canExecuteClickCommands(sign.isFacingFrontText(player), player)
-            && stack.getItem() instanceof HangingSignItem
-            && hitResult.getDirection().equals(Direction.DOWN);
+        return !sign.canExecuteClickCommands(sign.isFacingFrontText(player), player) && stack.getItem() instanceof HangingSignItem && hitResult.getDirection().equals(Direction.DOWN);
     }
 
     @Override
@@ -102,38 +84,40 @@
 
     @Override
     public BlockState getStateForPlacement(BlockPlaceContext ctx) {
-        Level level = ctx.getLevel();
-        FluidState fluidState = level.getFluidState(ctx.getClickedPos());
-        BlockPos blockPos = ctx.getClickedPos().above();
-        BlockState blockState = level.getBlockState(blockPos);
-        boolean bl = blockState.is(BlockTags.ALL_HANGING_SIGNS);
-        Direction direction = Direction.fromYRot((double)ctx.getRotation());
-        boolean bl2 = !Block.isFaceFull(blockState.getCollisionShape(level, blockPos), Direction.DOWN) || ctx.isSecondaryUseActive();
-        if (bl && !ctx.isSecondaryUseActive()) {
-            if (blockState.hasProperty(WallHangingSignBlock.FACING)) {
-                Direction direction2 = blockState.getValue(WallHangingSignBlock.FACING);
-                if (direction2.getAxis().test(direction)) {
-                    bl2 = false;
+        Level world = ctx.getLevel();
+        FluidState fluid = world.getFluidState(ctx.getClickedPos());
+        BlockPos blockposition = ctx.getClickedPos().above();
+        BlockState iblockdata = world.getBlockState(blockposition);
+        boolean flag = iblockdata.is(BlockTags.ALL_HANGING_SIGNS);
+        Direction enumdirection = Direction.fromYRot((double) ctx.getRotation());
+        boolean flag1 = !Block.isFaceFull(iblockdata.getCollisionShape(world, blockposition), Direction.DOWN) || ctx.isSecondaryUseActive();
+
+        if (flag && !ctx.isSecondaryUseActive()) {
+            if (iblockdata.hasProperty(WallHangingSignBlock.FACING)) {
+                Direction enumdirection1 = (Direction) iblockdata.getValue(WallHangingSignBlock.FACING);
+
+                if (enumdirection1.getAxis().test(enumdirection)) {
+                    flag1 = false;
                 }
-            } else if (blockState.hasProperty(ROTATION)) {
-                Optional<Direction> optional = RotationSegment.convertToDirection(blockState.getValue(ROTATION));
-                if (optional.isPresent() && optional.get().getAxis().test(direction)) {
-                    bl2 = false;
+            } else if (iblockdata.hasProperty(CeilingHangingSignBlock.ROTATION)) {
+                Optional<Direction> optional = RotationSegment.convertToDirection((Integer) iblockdata.getValue(CeilingHangingSignBlock.ROTATION));
+
+                if (optional.isPresent() && ((Direction) optional.get()).getAxis().test(enumdirection)) {
+                    flag1 = false;
                 }
             }
         }
 
-        int i = !bl2 ? RotationSegment.convertToSegment(direction.getOpposite()) : RotationSegment.convertToSegment(ctx.getRotation() + 180.0F);
-        return this.defaultBlockState()
-            .setValue(ATTACHED, Boolean.valueOf(bl2))
-            .setValue(ROTATION, Integer.valueOf(i))
-            .setValue(WATERLOGGED, Boolean.valueOf(fluidState.getType() == Fluids.WATER));
+        int i = !flag1 ? RotationSegment.convertToSegment(enumdirection.getOpposite()) : RotationSegment.convertToSegment(ctx.getRotation() + 180.0F);
+
+        return (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(CeilingHangingSignBlock.ATTACHED, flag1)).setValue(CeilingHangingSignBlock.ROTATION, i)).setValue(CeilingHangingSignBlock.WATERLOGGED, fluid.getType() == Fluids.WATER);
     }
 
     @Override
     protected VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
-        VoxelShape voxelShape = AABBS.get(state.getValue(ROTATION));
-        return voxelShape == null ? SHAPE : voxelShape;
+        VoxelShape voxelshape = (VoxelShape) CeilingHangingSignBlock.AABBS.get(state.getValue(CeilingHangingSignBlock.ROTATION));
+
+        return voxelshape == null ? CeilingHangingSignBlock.SHAPE : voxelshape;
     }
 
     @Override
@@ -143,29 +127,27 @@
 
     @Override
     protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
-        return direction == Direction.UP && !this.canSurvive(state, world, pos)
-            ? Blocks.AIR.defaultBlockState()
-            : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
+        return direction == Direction.UP && !this.canSurvive(state, world, pos) ? Blocks.AIR.defaultBlockState() : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
     }
 
     @Override
     public float getYRotationDegrees(BlockState state) {
-        return RotationSegment.convertToDegrees(state.getValue(ROTATION));
+        return RotationSegment.convertToDegrees((Integer) state.getValue(CeilingHangingSignBlock.ROTATION));
     }
 
     @Override
     protected BlockState rotate(BlockState state, Rotation rotation) {
-        return state.setValue(ROTATION, Integer.valueOf(rotation.rotate(state.getValue(ROTATION), 16)));
+        return (BlockState) state.setValue(CeilingHangingSignBlock.ROTATION, rotation.rotate((Integer) state.getValue(CeilingHangingSignBlock.ROTATION), 16));
     }
 
     @Override
     protected BlockState mirror(BlockState state, Mirror mirror) {
-        return state.setValue(ROTATION, Integer.valueOf(mirror.mirror(state.getValue(ROTATION), 16)));
+        return (BlockState) state.setValue(CeilingHangingSignBlock.ROTATION, mirror.mirror((Integer) state.getValue(CeilingHangingSignBlock.ROTATION), 16));
     }
 
     @Override
     protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
-        builder.add(ROTATION, ATTACHED, WATERLOGGED);
+        builder.add(CeilingHangingSignBlock.ROTATION, CeilingHangingSignBlock.ATTACHED, CeilingHangingSignBlock.WATERLOGGED);
     }
 
     @Override
@@ -176,6 +158,6 @@
     @Nullable
     @Override
     public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
-        return createTickerHelper(type, BlockEntityType.HANGING_SIGN, SignBlockEntity::tick);
+        return null; // Craftbukkit - remove unnecessary sign ticking
     }
 }
