From 379b6a8bd15abeff04fd5c411689f438b08ee62c Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Mon, 6 Feb 2017 20:05:08 +0300 Subject: [PATCH] Fix generate oil around coordinates 0 0 --- src/main/java/gregtech/api/util/GT_Utility.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index c2d0cbeb..1346eef2 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1529,11 +1529,11 @@ public class GT_Utility { return null; } - Random tRandom = new Random((aWorld.getSeed() + (aX / 96) + (7 * (aZ / 96)))); + Random tRandom = new Random((aWorld.getSeed() + ((int)Math.floor(aX / 96.d)) + (7 * ((int)Math.floor(aZ / 96.d))))); int oil = tRandom.nextInt(3); double amount = tRandom.nextInt(50) + tRandom.nextDouble(); oil = tRandom.nextInt(4); -// System.out.println("Oil: "+(aX/96)+" "+(aZ/96)+" "+oil+" "+amount); +// System.out.println("Oil: "+((int)Math.floor(aX/96.d))+" "+((int)Math.floor(aZ/96.d))+" "+oil+" "+amount+"dd"); // amount = 40; Fluid tFluid = null; switch (oil) {