2017-05-14 20:05:01 +02:00
|
|
|
From ad7da1f8a8c69dde2730efb96e7c0a74c3cd591d Mon Sep 17 00:00:00 2001
|
2017-01-23 22:11:07 +01:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
|
|
Date: Mon, 23 Jan 2017 15:10:25 -0600
|
|
|
|
Subject: [PATCH] Do not allow a zero max height in BiomeJungle
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BiomeJungle.java b/src/main/java/net/minecraft/server/BiomeJungle.java
|
2017-05-14 20:05:01 +02:00
|
|
|
index 8f67cb36c..8dc0b6238 100644
|
2017-01-23 22:11:07 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/BiomeJungle.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BiomeJungle.java
|
2017-05-14 20:05:01 +02:00
|
|
|
@@ -40,7 +40,11 @@ public class BiomeJungle extends BiomeBase {
|
2017-01-23 22:11:07 +01:00
|
|
|
super.a(world, random, blockposition);
|
|
|
|
int i = random.nextInt(16) + 8;
|
|
|
|
int j = random.nextInt(16) + 8;
|
|
|
|
- int k = random.nextInt(world.getHighestBlockYAt(blockposition.a(i, 0, j)).getY() * 2);
|
|
|
|
+ // Paper start - Don't allow a 0 height
|
|
|
|
+ int height = world.getHighestBlockYAt(blockposition.add(i, 0, j)).getY() * 2;
|
|
|
|
+ if (height < 1) height = 1;
|
|
|
|
+ int k = random.nextInt(height);
|
|
|
|
+ // Paper end
|
|
|
|
|
|
|
|
(new WorldGenMelon()).generate(world, random, blockposition.a(i, k, j));
|
|
|
|
WorldGenVines worldgenvines = new WorldGenVines();
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
2017-04-29 12:27:31 +02:00
|
|
|
index 6a0b3a62d..38a7af58c 100644
|
2017-01-23 22:11:07 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
|
|
|
@@ -42,6 +42,7 @@ public class BlockPosition extends BaseBlockPosition {
|
|
|
|
this(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public BlockPosition add(double x, double y, double z) { return this.a(x, y, z); } // Paper - OBFHELPER
|
|
|
|
public BlockPosition a(double d0, double d1, double d2) {
|
|
|
|
return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2);
|
|
|
|
}
|
|
|
|
--
|
2017-05-14 20:05:01 +02:00
|
|
|
2.13.0
|
2017-01-23 22:11:07 +01:00
|
|
|
|