Skip to content

Commit

Permalink
Fix out of bounds error
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Feb 11, 2023
1 parent 54a559f commit b69206e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 175 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) {
if (c != null) {
int xx = Math.floorMod(x, 16);
int zz = Math.floorMod(z, 16);
int yy = Math.max(Math.min(y * 4, worldInfo.getMaxHeight()), worldInfo.getMinHeight()); // To handle bug in Spigot
int yy = Math.max(Math.min(y * 4, worldInfo.getMaxHeight() - 1), worldInfo.getMinHeight()); // To handle bug in Spigot

return c.getBiome(xx, yy, zz);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
public class BoxedSeedChunkGenerator extends AbstractBoxedChunkGenerator {

private final BiomeProvider biomeProvider;
private final Environment env;

/**
* @param boxed - addon
Expand All @@ -26,7 +25,6 @@ public class BoxedSeedChunkGenerator extends AbstractBoxedChunkGenerator {
public BoxedSeedChunkGenerator(Boxed boxed, Environment env) {
super(boxed);
this.biomeProvider = null;
this.env = env;
}

/**
Expand All @@ -37,7 +35,6 @@ public BoxedSeedChunkGenerator(Boxed boxed, Environment env) {
public BoxedSeedChunkGenerator(Boxed boxed, Environment env, BiomeProvider bp) {
super(boxed);
this.biomeProvider = bp;
this.env = env;
}


Expand Down

0 comments on commit b69206e

Please sign in to comment.