Browse Source

Fixed Worldgenn Random too

Gregorius Techneticies 2 months ago
parent
commit
d2e122fca6
Signed by: Gregorius Techneticies <gregoriustech@gmail.com> GPG Key ID: 1B693EA14F2FD70F
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      CHANGELOG.md
  2. 2
    2
      src/main/java/gregapi/util/WD.java

+ 1
- 1
CHANGELOG.md View File

@@ -12,7 +12,7 @@ Nothing (I tend to only add finished Stuff to the Changelog).
12 12
 6.14.09: (Not released yet, happens whenever a Bugfix needs to be released, Bear is still testing GT6, while I'm working on my Game)
13 13
 [COMPAT] Aroma1997's Mining Dimension is now Compatible with my Worldgen.
14 14
 [FIXED] Chainsaws used WAY too much durability for Treecapitation!
15
-[FIXED] Stone Layers in different Dimensions had the same RNG as on the Overworld.
15
+[FIXED] Worldgeneration in different Dimensions had the same RNG as on the Overworld. Now the Seed is being XOR-ed with the Dimension ID to prevent that. This has the convenient Side Effect of the Overworld staying the same as before, because it's ID is Zero.
16 16
 [ADDED] Axes, Saws and Chainsaws can now place Saplings too. They will still place Workbenches if Saplings cant be placed.
17 17
 [ADDED] Tooltip for Covers that can be controlled with the Cover Controller Cover. In case of Covers where the Cover Controller Cover is required (such as Shutter Cover), it will be Cyan instead of Dark Gray to make it easier to see.
18 18
 

+ 2
- 2
src/main/java/gregapi/util/WD.java View File

@@ -426,7 +426,7 @@ public class WD {
426 426
 		return T;
427 427
 	}
428 428
 	
429
-	public static Random random(World aWorld, long aChunkX, long aChunkZ) {return random(aChunkX, aChunkZ, aWorld.getSeed());}
429
+	public static Random random(World aWorld, long aChunkX, long aChunkZ) {return random(aChunkX, aChunkZ, aWorld.getSeed() ^ aWorld.provider.dimensionId);}
430 430
 	public static Random random(long aSeed, long aChunkX, long aChunkZ) {
431 431
 		Random rRandom = new Random(aSeed);
432 432
 		for (int i = 0; i < 50; i++) rRandom.nextInt(0x00ffffff);
@@ -435,7 +435,7 @@ public class WD {
435 435
 		return rRandom;
436 436
 	}
437 437
 	
438
-	public static int random(World aWorld, int aX, int aY, int aZ, int aBound) {return random(aWorld.getSeed(), aX, aY, aZ, aBound);}
438
+	public static int random(World aWorld, int aX, int aY, int aZ, int aBound) {return random(aWorld.getSeed() ^ aWorld.provider.dimensionId, aX, aY, aZ, aBound);}
439 439
 	public static int random(long aSeed, int aX, int aY, int aZ, int aBound) {
440 440
 		Random rRandom = new Random(aSeed);
441 441
 		for (int i = 0; i < 10; i++) rRandom.nextInt(0x00ffffff);

Loading…
Cancel
Save