content: package com.github.alexthe666.rats.server.block;
  
  import com.github.alexthe666.rats.registry.RatsBlockEntityRegistry;
  import com.github.alexthe666.rats.registry.RatsCauldronRegistry;
  import com.github.alexthe666.rats.server.block.entity.MilkCauldronBlockEntity;
  import net.minecraft.core.BlockPos;
  import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.Items;
  import net.minecraft.world.level.BlockGetter;
  import net.minecraft.world.level.Level;
  import net.minecraft.world.level.block.AbstractCauldronBlock;
  import net.minecraft.world.level.block.EntityBlock;
  import net.minecraft.world.level.block.entity.BlockEntity;
  import net.minecraft.world.level.block.entity.BlockEntityTicker;
  import net.minecraft.world.level.block.entity.BlockEntityType;
  import net.minecraft.world.level.block.state.BlockBehaviour;
  import net.minecraft.world.level.block.state.BlockState;
  import net.minecraft.world.phys.HitResult;
  import org.jetbrains.annotations.Nullable;
  
  public class MilkCauldronBlock extends AbstractCauldronBlock implements EntityBlock {
  
  	public MilkCauldronBlock(BlockBehaviour.Properties properties) {
  		super(properties, RatsCauldronRegistry.MILK);
  	}
  
  	@Override
  	protected double getContentHeight(BlockState state) {
  		return 0.9375D;
  	}
  
  	@Override
  	public boolean isFull(BlockState state) {
  		return true;
  	}
  
  	@Override
  	public ItemStack getCloneItemStack(BlockState state, HitResult target, BlockGetter level, BlockPos pos, Player player) {
  		return new ItemStack(Items.CAULDRON);
  	}
  
  	@Nullable
  	@Override
  	public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
  		return new MilkCauldronBlockEntity(pos, state);
  	}
  
  	@SuppressWarnings("unchecked")
  	@Nullable
  	protected static <E extends BlockEntity, A extends BlockEntity> BlockEntityTicker<A> createTickerHelper(BlockEntityType<A> levelType, BlockEntityType<E> registryType, BlockEntityTicker<? super E> ticker) {
  		return registryType == levelType ? (BlockEntityTicker<A>) ticker : null;
  	}
  
  	@Nullable
  	@Override
  	public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> type) {
  		return createTickerHelper(type, RatsBlockEntityRegistry.MILK_CAULDRON.get(), MilkCauldronBlockEntity::tick);
  	}
  }
  