Skip to content

Commit

Permalink
Update MixinWorldGenSewers.java
Browse files Browse the repository at this point in the history
  • Loading branch information
quentin452 committed Dec 23, 2023
1 parent 030592b commit a9d0347
Showing 1 changed file with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,25 @@ public boolean LocationIsValidSpawn(World world, int posX, int posY, int posZ) {
*/
@Overwrite(remap = false)
public boolean func_76484_a(World world, Random rand, int i, int j, int k) {
if (this.LocationIsValidSpawn(world, i, j, k) && this.LocationIsValidSpawn(world, i + 8, j, k)
int chunkX = i >> 4;
int chunkZ = k >> 4;

boolean allCornersInChunk = chunkX * 16 == i && chunkZ * 16 == k
&& this.LocationIsValidSpawn(world, i, j, k)
&& this.LocationIsValidSpawn(world, i + 8, j, k)
&& this.LocationIsValidSpawn(world, i + 8, j, k + 4)
&& this.LocationIsValidSpawn(world, i, j, k + 4)) {
optimizationsAndTweaks$generate1(world,rand,i,j,k);
optimizationsAndTweaks$generate2(world,rand,i,j,k);
optimizationsAndTweaks$generate3(world,rand,i,j,k);
optimizationsAndTweaks$generate4(world,rand,i,j,k);
&& this.LocationIsValidSpawn(world, i, j, k + 4);

if (i >= 0 && i < 16 && k >= 0 && k < 16 && j >= 0 && j < 256 && allCornersInChunk) {
optimizationsAndTweaks$generate1(world, rand, i, j, k);
optimizationsAndTweaks$generate2(world, rand, i, j, k);
optimizationsAndTweaks$generate3(world, rand, i, j, k);
optimizationsAndTweaks$generate4(world, rand, i, j, k);

if (!world.isRemote) {
optimizationsAndTweaks$generate5(world,rand,i,j,k);
optimizationsAndTweaks$generate5(world, rand, i, j, k);
}

return true;
} else {
return false;
Expand Down

0 comments on commit a9d0347

Please sign in to comment.