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:
Ursprung
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren