diff --git a/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java b/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java index 49be26d31..a25dcb5c1 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/block/SimpleChuteBlock.java @@ -18,7 +18,9 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Mirror; import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.SimpleWaterloggedBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; @@ -255,4 +257,16 @@ public boolean change(Player player, BlockPos pos, @NotNull Level level, ItemSta public @Nullable Property getChangeableProperty(BlockState blockState) { return FACING; } + + @SuppressWarnings("deprecation") + @Override + public @NotNull BlockState rotate(@NotNull BlockState state, @NotNull Rotation rotation) { + return state.setValue(FACING, rotation.rotate(state.getValue(FACING))); + } + + @SuppressWarnings("deprecation") + @Override + public @NotNull BlockState mirror(@NotNull BlockState state, @NotNull Mirror mirror) { + return state.rotate(mirror.getRotation(state.getValue(FACING))); + } }