Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GTNewHorizons/LunatriusCore
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 608c0cc8d4c6ed8013d916527a1b95eae18dc6c3
Choose a base ref
..
head repository: GTNewHorizons/LunatriusCore
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 87464b499e65c280df36ca9a2bb85f50e4df7a2d
Choose a head ref
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/com/github/lunatrius/core/world/chunk/ChunkHelper.java
Original file line number Diff line number Diff line change
@@ -7,8 +7,9 @@ public class ChunkHelper {
private static final Random RANDOM = new Random();

public static boolean isSlimeChunk(long seed, int x, int z) {
// noinspection IntegerMultiplicationImplicitCastToLong - we want to do the casts as integers and *then* cast
RANDOM.setSeed(
seed + (long) x * x * 0x4c1906 + (long) x * 0x5ac0db + (long) z * z * 0x4307a7L + (long) z * 0x5f24f
seed + (long) (x * x * 0x4c1906) + (long) (x * 0x5ac0db) + (long) (z * z) * 0x4307a7L + (long) (z * 0x5f24f)
^ 0x3ad8025fL);
return RANDOM.nextInt(10) == 0;
}