Load chunks when setting biomes too.

Dieser Commit ist enthalten in:
wizjany 2019-07-28 10:21:29 -04:00
Ursprung 6855f22152
Commit f4c238c3da

Datei anzeigen

@ -24,8 +24,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.extent.AbstractDelegateExtent; import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.extent.Extent;
import com.sk89q.worldedit.math.BlockVector2;
import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockStateHolder;
/** /**
@ -67,4 +69,12 @@ public class ChunkLoadingExtent extends AbstractDelegateExtent {
} }
return super.setBlock(location, block); return super.setBlock(location, block);
} }
@Override
public boolean setBiome(BlockVector2 position, BiomeType biome) {
if (enabled) {
world.checkLoadedChunk(position.toBlockVector3());
}
return super.setBiome(position, biome);
}
} }