content: package com.github.alexthe666.rats.server.block;
  
  import net.minecraft.ChatFormatting;
  import net.minecraft.core.Direction;
  import net.minecraft.network.chat.Component;
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.TooltipFlag;
  import net.minecraft.world.item.context.BlockPlaceContext;
  import net.minecraft.world.level.BlockGetter;
  import net.minecraft.world.level.block.Block;
  import net.minecraft.world.level.block.HorizontalDirectionalBlock;
  import net.minecraft.world.level.block.state.BlockBehaviour;
  import net.minecraft.world.level.block.state.BlockState;
  import net.minecraft.world.level.block.state.StateDefinition;
  import org.jetbrains.annotations.Nullable;
  
  import java.util.List;
  
  public class CompressedRatBlock extends HorizontalDirectionalBlock {
  
  	public CompressedRatBlock(BlockBehaviour.Properties properties) {
  		super(properties);
  		this.registerDefaultState(this.getStateDefinition().any().setValue(FACING, Direction.NORTH));
  	}
  
  	@Nullable
  	@Override
  	public BlockState getStateForPlacement(BlockPlaceContext context) {
  		return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite());
  	}
  
  	@Override
  	protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
  		builder.add(FACING);
  	}
  
  	@Override
  	public void appendHoverText(ItemStack stack, @Nullable BlockGetter getter, List<Component> tooltip, TooltipFlag flag) {
  		tooltip.add(Component.translatable("block.rats.compressed_rat.desc").withStyle(ChatFormatting.GRAY));
  	}
  
  }