[Change] added inBiome Test before costly layer searches

This commit is contained in:
Frank 2023-05-23 22:55:24 +02:00
parent 4bb3512433
commit 8b578e7cdf

View file

@ -395,15 +395,25 @@ abstract class CommonPlacedFeatureBuilder<F extends Feature<FC>, FC extends Feat
} }
public T vanillaNetherGround(int countPerLayer) { public T vanillaNetherGround(int countPerLayer) {
return (T) this.onEveryLayer(countPerLayer).onlyInBiome(); return (T) this.randomHeight4FromFloorCeil().onlyInBiome().onEveryLayer(countPerLayer).onlyInBiome();
} }
public T betterNetherGround(int countPerLayer) { public T betterNetherGround(int countPerLayer) {
return (T) this.count(countPerLayer).squarePlacement().onEveryLayerMin4().onlyInBiome(); return (T) this.randomHeight4FromFloorCeil()
.count(countPerLayer)
.squarePlacement()
.onlyInBiome()
.onEveryLayerMin4()
.onlyInBiome();
} }
public T betterNetherCeiling(int countPerLayer) { public T betterNetherCeiling(int countPerLayer) {
return (T) this.count(countPerLayer).squarePlacement().underEveryLayerMin4().onlyInBiome(); return (T) this.randomHeight4FromFloorCeil()
.count(countPerLayer)
.squarePlacement()
.onlyInBiome()
.underEveryLayerMin4()
.onlyInBiome();
} }
public T betterNetherOnWall(int countPerLayer) { public T betterNetherOnWall(int countPerLayer) {