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

#32 IntellectualSites/FastAsyncWorldEdit-Adapters#7
This commit is contained in:
dordsor21 2021-09-22 15:04:12 +01:00
parent d25a85e0d4
commit 3376baa3c5
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ public class ForestGenerator implements RegionFunction {
// we trick editsession history here in the first call
editSession.setBlock(position, BlockTypes.AIR.getDefaultState());
// 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
boolean success = treeType.generate(editSession, position);
if (!success) {

View File

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