Skip to content

Commit d57e503

Browse files
authored
Fix for #637 and Cubic Chunks compatibility crash. Update Forestry min version (#638)
* Updated to forestry 5.8.2.418 Fixed crash for Cubic Chunks * Fixed crash on sapling trying to grow in invalid position.(Fix: #637)
1 parent ef939d4 commit d57e503

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

extrabees/src/main/java/binnie/extrabees/worldgen/WorldGenHiveMarble.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public BlockPos getPosForHive(World world, int x, int z) {
2727
//get to ground
2828
BlockPos topPos = world.getHeight(new BlockPos(x, 0, z));
2929
int worldHeight = topPos.getY();
30-
if (topPos.getY() == 0) {
30+
if (topPos.getY() <= 0) {
3131
return null;
3232
}
3333

extrabees/src/main/java/binnie/extrabees/worldgen/WorldGenHiveRock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public BlockPos getPosForHive(World world, int x, int z) {
3232
//get to the ground
3333
BlockPos topPos = world.getHeight(new BlockPos(x, 0, z));
3434
int worldHeight = topPos.getY();
35-
if (topPos.getY() == 0) {
35+
if (topPos.getY() <= 0) {
3636
return null;
3737
}
3838

extrabees/src/main/java/binnie/extrabees/worldgen/WorldGenHiveWater.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public BlockPos getPosForHive(World world, int x, int z) {
2020
// get to the ground
2121
final BlockPos topPos = world.getHeight(new BlockPos(x, 0, z));
2222
int maxHeight = topPos.getY();
23-
if (topPos.getY() == 0) {
23+
if (topPos.getY() <= 0) {
2424
return null;
2525
}
2626

extratrees/src/main/java/binnie/extratrees/gen/BinnieWorldGenTree.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ public final boolean generate(World world, Random random, BlockPos pos, boolean
113113
genPos = getValidGrowthPos(world, pos);
114114
}
115115

116+
if (genPos == null || (!force && !this.canGrow())) {
117+
return false;
118+
}
119+
116120
this.pos = genPos;
121+
117122
this.preGenerate(world, random, this.pos);
118123

119-
if (!force && !this.canGrow() || genPos == null) {
120-
return false;
121-
}
122124
generateTrunk();
123125
generateLeaves();
124126
if(tree.allowsFruitBlocks()) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ forgeversion=14.23.5.2847
88
mcp_mappings=stable_39
99
curse_project_id=223525
1010

11-
forestry_version=5.8.2.370
11+
forestry_version=5.8.2.418
1212
forestry_mcversion=1.12.2
1313
ic2_version=2.8.187-ex112
1414

0 commit comments

Comments
 (0)