Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIIL committed Jan 28, 2019
1 parent 5274951 commit ed00d29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions buildcraft_resources/changelog/7.99.22
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Bug fixes:
* [#4325] Fixed the guide book's contents page not going back to the previous page when searching over the page count.
* [#4328] Fix the guide always reloading all data twice, rather than once.
* [#4331] Fixed the config option "useSwappableSprites" not being respected for fluid sprites.
* [#4342] Fixed a crash when setting the oil well heights in the config to invalid values (such as small_max_height=10 and small_min_height=14)
13 changes: 11 additions & 2 deletions common/buildcraft/energy/generation/OilGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,17 @@ public static List<OilGenStructure> getStructures(World world, int cx, int cz) {
maxHeight = BCEnergyConfig.smallSpoutMaxHeight;
radius = 0;
}

int height = minHeight + rand.nextInt(maxHeight - minHeight);
final int height;
if (maxHeight == minHeight) {
height = maxHeight;
} else {
if (maxHeight < minHeight) {
int t = maxHeight;
maxHeight = minHeight;
minHeight = t;
}
height = minHeight + rand.nextInt(maxHeight - minHeight);
}
structures.add(createSpout(new BlockPos(x, wellY, z), height, radius));
}

Expand Down

0 comments on commit ed00d29

Please sign in to comment.