// Path: src/main/java/net/darkhax/darkutils/DarkUtils.java
// @Mod(DarkUtils.MOD_ID)
// public class DarkUtils {
//     
//     public static final String MOD_ID = "darkutils";
//     
//     public static final String MOD_NAME = "Dark Utilities";
//     
//     public static final Logger LOG = LogManager.getLogger(MOD_NAME);
//     
//     public static final ItemGroup ITEM_GROUP = new ItemGroupBase(MOD_ID, () -> new ItemStack(DarkUtils.content.vectorPlate));
//     
//     public static final NetworkHelper NETWORK = new NetworkHelper(new ResourceLocation(MOD_ID, "main"), "2.0.X");
//     
//     public static RegistryHelper registry;
//     
//     public static Content content;
//     
//     public static AddonManager addons;
//     
//     public DarkUtils() {
//         
//         registry = DistExecutor.runForDist( () -> () -> new RegistryHelperClient(MOD_ID, LOG, ITEM_GROUP), () -> () -> new RegistryHelper(MOD_ID, LOG, ITEM_GROUP));
//         content = DistExecutor.runForDist( () -> () -> new ContentClient(registry), () -> () -> new Content(registry));
//         NETWORK.registerEnqueuedMessage(MessageSyncCrucibleType.class, NetworkHandlerServer::encodeStageMessage, t -> NetworkHandlerClient.decodeStageMessage(t), (t, u) -> NetworkHandlerClient.processSyncStagesMessage(t, u));
//         registry.initialize(FMLJavaModLoadingContext.get().getModEventBus());
//         
//         // Addons
//         addons = new AddonManager();
//     }
// }


import net.darkhax.darkutils.DarkUtils;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.ContainerBlock;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.IBooleanFunction;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
    @Override
    public boolean onBlockActivated (BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
        
        final TileEntity tile = world.getTileEntity(pos);
        
        if (tile instanceof TileEntitySlimeCrucible) {
            
            final TileEntitySlimeCrucible crucible = (TileEntitySlimeCrucible) tile;
            
            final ItemStack heldItem = player.getHeldItem(handIn);
            
            final int points = TileEntitySlimeCrucible.getSlimePointsForItem(world, heldItem, this.type);
            
            // If the item can be eaten, try to eat the item and modify the state of the
            // crucible.
            if (points > 0 && crucible.getContainedSlimePoints() <= this.getCrucibleType().getMaxSlimePoints()) {
                
                // Increases the slime points.
                crucible.addSlimePoints(points);
                
                if (world instanceof ServerWorld) {
                    
                    final ServerWorld serverWorld = (ServerWorld) world;
                    
                    // Spawns food eating particles.
                    for (int i = 0; i < 16; i++) {
                        
                        serverWorld.spawnParticle(new ItemParticleData(ParticleTypes.ITEM, heldItem), pos.getX() + 0.5d, pos.getY() + 1.25d, pos.getZ() + 0.5d, 1, world.rand.nextDouble() * 0.45 - 0.45, 0d, world.rand.nextDouble() * 0.45 - 0.45, 0d);
                    }
                    
// Path: src/main/java/net/darkhax/darkutils/DarkUtils.java
// @Mod(DarkUtils.MOD_ID)
// public class DarkUtils {
//     
//     public static final String MOD_ID = "darkutils";
//     
//     public static final String MOD_NAME = "Dark Utilities";
//     
//     public static final Logger LOG = LogManager.getLogger(MOD_NAME);
//     
//     public static final ItemGroup ITEM_GROUP = new ItemGroupBase(MOD_ID, () -> new ItemStack(DarkUtils.content.vectorPlate));
//     
//     public static final NetworkHelper NETWORK = new NetworkHelper(new ResourceLocation(MOD_ID, "main"), "2.0.X");
//     
//     public static RegistryHelper registry;
//     
//     public static Content content;
//     
//     public static AddonManager addons;
//     
//     public DarkUtils() {
//         
//         registry = DistExecutor.runForDist( () -> () -> new RegistryHelperClient(MOD_ID, LOG, ITEM_GROUP), () -> () -> new RegistryHelper(MOD_ID, LOG, ITEM_GROUP));
//         content = DistExecutor.runForDist( () -> () -> new ContentClient(registry), () -> () -> new Content(registry));
//         NETWORK.registerEnqueuedMessage(MessageSyncCrucibleType.class, NetworkHandlerServer::encodeStageMessage, t -> NetworkHandlerClient.decodeStageMessage(t), (t, u) -> NetworkHandlerClient.processSyncStagesMessage(t, u));
//         registry.initialize(FMLJavaModLoadingContext.get().getModEventBus());
//         
//         // Addons
//         addons = new AddonManager();
//     }
// }


// Path: src/main/java/net/darkhax/darkutils/features/slimecrucible/BlockSlimeCrucible.java
import net.darkhax.darkutils.DarkUtils;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.ContainerBlock;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.particles.ItemParticleData;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.IBooleanFunction;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;

    @Override
    public boolean onBlockActivated (BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
        
        final TileEntity tile = world.getTileEntity(pos);
        
        if (tile instanceof TileEntitySlimeCrucible) {
            
            final TileEntitySlimeCrucible crucible = (TileEntitySlimeCrucible) tile;
            
            final ItemStack heldItem = player.getHeldItem(handIn);
            
            final int points = TileEntitySlimeCrucible.getSlimePointsForItem(world, heldItem, this.type);
            
            // If the item can be eaten, try to eat the item and modify the state of the
            // crucible.
            if (points > 0 && crucible.getContainedSlimePoints() <= this.getCrucibleType().getMaxSlimePoints()) {
                
                // Increases the slime points.
                crucible.addSlimePoints(points);
                
                if (world instanceof ServerWorld) {
                    
                    final ServerWorld serverWorld = (ServerWorld) world;
                    
                    // Spawns food eating particles.
                    for (int i = 0; i < 16; i++) {
                        
                        serverWorld.spawnParticle(new ItemParticleData(ParticleTypes.ITEM, heldItem), pos.getX() + 0.5d, pos.getY() + 1.25d, pos.getZ() + 0.5d, 1, world.rand.nextDouble() * 0.45 - 0.45, 0d, world.rand.nextDouble() * 0.45 - 0.45, 0d);
                    }
                    
                    player.addStat(DarkUtils.content.statSlimeCrucibleFeed);