Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-02 17:40:09 +01:00
Optimize biome retrieval
Dieser Commit ist enthalten in:
Ursprung
e6b083554b
Commit
27f16d97b3
@ -185,10 +185,12 @@ public class Regen_v1_15_R2 extends Regenerator<IChunkAccess, ProtoChunk, Chunk,
|
||||
public void doTick(BooleanSupplier booleansupplier) { //no ticking
|
||||
}
|
||||
|
||||
private final BiomeBase singleBiome = options.hasBiomeType() ? IRegistry.BIOME.get(MinecraftKey.a(options.getBiomeType().getId())) : null;
|
||||
|
||||
@Override
|
||||
public BiomeBase a(int i, int k, int j) {
|
||||
if (options.hasBiomeType()) {
|
||||
return IRegistry.BIOME.get(MinecraftKey.a(options.getBiomeType().getId()));
|
||||
return singleBiome;
|
||||
}
|
||||
return this.getChunkProvider().getChunkGenerator().getWorldChunkManager().getBiome(i, j, k);
|
||||
}
|
||||
|
@ -203,10 +203,12 @@ public class Regen_v1_16_R1 extends Regenerator<IChunkAccess, ProtoChunk, Chunk,
|
||||
public void doTick(BooleanSupplier booleansupplier) { //no ticking
|
||||
}
|
||||
|
||||
private final BiomeBase singleBiome = options.hasBiomeType() ? IRegistry.BIOME.get(MinecraftKey.a(options.getBiomeType().getId())) : null;
|
||||
|
||||
@Override
|
||||
public BiomeBase a(int i, int j, int k) {
|
||||
if (options.hasBiomeType()) {
|
||||
return IRegistry.BIOME.get(MinecraftKey.a(options.getBiomeType().getId()));
|
||||
return singleBiome;
|
||||
}
|
||||
return this.getChunkProvider().getChunkGenerator().getWorldChunkManager().getBiome(i, j, k);
|
||||
}
|
||||
|
@ -208,10 +208,12 @@ public class Regen_v1_16_R2 extends Regenerator<IChunkAccess, ProtoChunk, Chunk,
|
||||
public void doTick(BooleanSupplier booleansupplier) { //no ticking
|
||||
}
|
||||
|
||||
private final BiomeBase singleBiome = options.hasBiomeType() ? RegistryGeneration.WORLDGEN_BIOME.get(MinecraftKey.a(options.getBiomeType().getId())) : null;
|
||||
|
||||
@Override
|
||||
public BiomeBase a(int i, int j, int k) {
|
||||
if (options.hasBiomeType()) {
|
||||
return RegistryGeneration.WORLDGEN_BIOME.get(MinecraftKey.a(options.getBiomeType().getId()));
|
||||
return singleBiome;
|
||||
}
|
||||
return this.getChunkProvider().getChunkGenerator().getWorldChunkManager().getBiome(i, j, k);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren