3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Remove needless EditSession#getWorld for setting blocks/biomes in a couple of cases

#32 IntellectualSites/FastAsyncWorldEdit-Adapters#7
Dieser Commit ist enthalten in:
dordsor21 2021-09-22 15:04:12 +01:00
Ursprung d25a85e0d4
Commit 3376baa3c5
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -60,7 +60,7 @@ public class ForestGenerator implements RegionFunction {
// we trick editsession history here in the first call // we trick editsession history here in the first call
editSession.setBlock(position, BlockTypes.AIR.getDefaultState()); editSession.setBlock(position, BlockTypes.AIR.getDefaultState());
// and then trick the generator here by directly setting into the world // and then trick the generator here by directly setting into the world
editSession.getWorld().setBlock(position, BlockTypes.AIR.getDefaultState()); editSession.setBlock(position, BlockTypes.AIR.getDefaultState());
// so that now the generator can generate the tree // so that now the generator can generate the tree
boolean success = treeType.generate(editSession, position); boolean success = treeType.generate(editSession, position);
if (!success) { if (!success) {

Datei anzeigen

@ -135,7 +135,7 @@ public abstract class ArbitraryBiomeShape {
if (!hollow) { if (!hollow) {
final BiomeType material = getBiome(x, y, z, baseBiome); final BiomeType material = getBiome(x, y, z, baseBiome);
if (material != null) { if (material != null) {
editSession.getWorld().setBiome(position, material); editSession.setBiome(position, material);
++affected; ++affected;
} }
@ -151,7 +151,7 @@ public abstract class ArbitraryBiomeShape {
continue; continue;
} }
editSession.getWorld().setBiome(position, material); editSession.setBiome(position, material);
++affected; ++affected;
} }