mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Remove needless EditSession#getWorld for setting blocks/biomes in a couple of cases
#32 IntellectualSites/FastAsyncWorldEdit-Adapters#7
This commit is contained in:
parent
d25a85e0d4
commit
3376baa3c5
@ -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) {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user