package com.github.lunatrius.core.world.chunk;

import net.minecraft.util.math.BlockPos;

import java.util.Random;

public class ChunkHelper {
    private static final Random RANDOM = new Random();

    public static boolean isSlimeChunk(final long seed, final BlockPos pos) {
        final long x = pos.getX() >> 4;
        final long z = pos.getZ() >> 4;
        RANDOM.setSeed(seed + (x * x * 4987142L) + (x * 5947611L) + (z * z * 4392871L) + (z * 389711L) ^ 987234911L);
        return RANDOM.nextInt(10) == 0;
    }
}

@@ -284,20 +284,19 @@
   final 
-long
+int
  x = pos
@@ -323,20 +323,19 @@
   final 
-long
+int
  z = pos
@@ -377,16 +377,23 @@
 d(seed +
+ (long)
  (x * x 
@@ -401,20 +401,26 @@
  4987142
-L
 ) +
+ (long)
  (x * 59
@@ -428,19 +428,26 @@
 7611
-L
 ) +
+ (long)
  (z * z
+)
  * 4
@@ -453,19 +453,25 @@
 4392871L
-)
  +
+ (long)
  (z * 38
@@ -474,17 +474,16 @@
 * 389711
-L
 ) %5E 9872

Use the proper formula for the random seed. The coordinates are multiplied as ints and are cast to longs for the final addition.