// Path: src/main/java/exter/substratum/creativetab/TabMaterials.java
// public class TabMaterials extends CreativeTabs
// {
//   public static TabMaterials tab = new TabMaterials();
// 
//   private TabMaterials()
//   {
//     super("substratum");
//   }
//   
//   @Override
//   public ItemStack getIconItemStack()
//   {
//     return SubstratumItems.getStack(EnumMaterialItem.INGOT, EnumMaterial.COPPER);
//   }
// 
//   @Override
//   public ItemStack getTabIconItem()
//   {
//     return getIconItemStack();
//   }
// }
// 
// Path: src/main/java/exter/substratum/fluid/FluidSubstratum.java
// public class FluidSubstratum extends Fluid
// {
//   public final EnumMaterial material;
//   
//   public FluidSubstratum(EnumMaterial material,String fluidName, ResourceLocation still, ResourceLocation flowing, int temperature, int luminosity)
//   {
//     super(fluidName, still, flowing);
//     this.material = material;
//     setUnlocalizedName("substratum." + fluidName);
//     setTemperature(temperature);
//     setLuminosity(luminosity);
//   }
// }
// 
// Path: src/main/java/exter/substratum/util/SubstratumUtils.java
// public class SubstratumUtils
// {
//   static public int divCeil(int a,int b)
//   {
//     return a / b + ((a % b == 0) ? 0 : 1);
//   }
// 
//   static public String getItemOreDictionaryName(ItemStack stack)
//   {
//     for(String name:OreDictionary.getOreNames())
//     {
//       List<ItemStack> ores = OreDictionary.getOres(name);
//       for(ItemStack i : ores)
//       {
//         if(i.isItemEqual(stack) && ItemStack.areItemStackTagsEqual(i, stack))
//         {
//           return name;
//         }
//       }
//     }
//     return null;
//   }
//   
//   static public String convertToRegistryName(String str)
//   {
//     if(str == null)
//     {
//       return null;
//     }
//     StringBuilder builder = new StringBuilder();
//     for(int i = 0; i < str.length(); i++)
//     {
//       char c = str.charAt(i);
//       if(Character.isUpperCase(c))
//       {
//         if(i > 0)
//         {
//           builder.append('_');
//         }
//         builder.append(Character.toLowerCase(c));
//       } else
//       {
//         builder.append(c);
//       }
//     }
//     return builder.toString();
//   }
// }


import java.util.Random;
import exter.substratum.creativetab.TabMaterials;
import exter.substratum.fluid.FluidSubstratum;
import exter.substratum.util.SubstratumUtils;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.SoundEvents;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
        world.playSound(dx, dy, dz, SoundEvents.BLOCK_LAVA_POP, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false);
      }

      if(rand.nextInt(200) == 0)
      {
        world.playSound((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), SoundEvents.BLOCK_LAVA_AMBIENT, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false);
      }
    }

    BlockPos down = pos.down();
    if (rand.nextInt(10) == 0 && world.getBlockState(down).isSideSolid(world, down, EnumFacing.UP))
    {
      dx = (double) ((float) pos.getX() + rand.nextFloat());
      dy = (double) pos.getY() - 1.05D;
      dz = (double) ((float) pos.getZ() + rand.nextFloat());

      world.spawnParticle(EnumParticleTypes.DRIP_LAVA, dx, dy, dz, 0.0D, 0.0D, 0.0D);
    }
  }

  @Override
  public boolean canDisplace(IBlockAccess world, BlockPos pos)
  {
    if(world.getBlockState(pos).getMaterial().isLiquid())
    {
      return false;
    }
    return super.canDisplace(world, pos);
  }

// Path: src/main/java/exter/substratum/creativetab/TabMaterials.java
// public class TabMaterials extends CreativeTabs
// {
//   public static TabMaterials tab = new TabMaterials();
// 
//   private TabMaterials()
//   {
//     super("substratum");
//   }
//   
//   @Override
//   public ItemStack getIconItemStack()
//   {
//     return SubstratumItems.getStack(EnumMaterialItem.INGOT, EnumMaterial.COPPER);
//   }
// 
//   @Override
//   public ItemStack getTabIconItem()
//   {
//     return getIconItemStack();
//   }
// }
// 
// Path: src/main/java/exter/substratum/fluid/FluidSubstratum.java
// public class FluidSubstratum extends Fluid
// {
//   public final EnumMaterial material;
//   
//   public FluidSubstratum(EnumMaterial material,String fluidName, ResourceLocation still, ResourceLocation flowing, int temperature, int luminosity)
//   {
//     super(fluidName, still, flowing);
//     this.material = material;
//     setUnlocalizedName("substratum." + fluidName);
//     setTemperature(temperature);
//     setLuminosity(luminosity);
//   }
// }
// 
// Path: src/main/java/exter/substratum/util/SubstratumUtils.java
// public class SubstratumUtils
// {
//   static public int divCeil(int a,int b)
//   {
//     return a / b + ((a % b == 0) ? 0 : 1);
//   }
// 
//   static public String getItemOreDictionaryName(ItemStack stack)
//   {
//     for(String name:OreDictionary.getOreNames())
//     {
//       List<ItemStack> ores = OreDictionary.getOres(name);
//       for(ItemStack i : ores)
//       {
//         if(i.isItemEqual(stack) && ItemStack.areItemStackTagsEqual(i, stack))
//         {
//           return name;
//         }
//       }
//     }
//     return null;
//   }
//   
//   static public String convertToRegistryName(String str)
//   {
//     if(str == null)
//     {
//       return null;
//     }
//     StringBuilder builder = new StringBuilder();
//     for(int i = 0; i < str.length(); i++)
//     {
//       char c = str.charAt(i);
//       if(Character.isUpperCase(c))
//       {
//         if(i > 0)
//         {
//           builder.append('_');
//         }
//         builder.append(Character.toLowerCase(c));
//       } else
//       {
//         builder.append(c);
//       }
//     }
//     return builder.toString();
//   }
// }


// Path: src/main/java/exter/substratum/block/BlockSubstratumLiquid.java
import java.util.Random;
import exter.substratum.creativetab.TabMaterials;
import exter.substratum.fluid.FluidSubstratum;
import exter.substratum.util.SubstratumUtils;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.SoundEvents;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

        world.playSound(dx, dy, dz, SoundEvents.BLOCK_LAVA_POP, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false);
      }

      if(rand.nextInt(200) == 0)
      {
        world.playSound((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), SoundEvents.BLOCK_LAVA_AMBIENT, SoundCategory.BLOCKS, 0.2F + rand.nextFloat() * 0.2F, 0.9F + rand.nextFloat() * 0.15F, false);
      }
    }

    BlockPos down = pos.down();
    if (rand.nextInt(10) == 0 && world.getBlockState(down).isSideSolid(world, down, EnumFacing.UP))
    {
      dx = (double) ((float) pos.getX() + rand.nextFloat());
      dy = (double) pos.getY() - 1.05D;
      dz = (double) ((float) pos.getZ() + rand.nextFloat());

      world.spawnParticle(EnumParticleTypes.DRIP_LAVA, dx, dy, dz, 0.0D, 0.0D, 0.0D);
    }
  }

  @Override
  public boolean canDisplace(IBlockAccess world, BlockPos pos)
  {
    if(world.getBlockState(pos).getMaterial().isLiquid())
    {
      return false;
    }
    return super.canDisplace(world, pos);
  }

  @Override