3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-09 21:10:05 +01:00

Improved Bukkit performance drastically.

Dieser Commit ist enthalten in:
sk89q 2011-01-31 01:16:49 -08:00
Ursprung f69184f9ab
Commit faf03079d6
2 geänderte Dateien mit 12 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -772,10 +772,17 @@ public class EditSession {
int affected = 0;
BaseBlock air = new BaseBlock(0);
for (int x = -size; x <= size; x++) {
for (int y = -size; y <= size; y++) {
for (int z = -size; z <= size; z++) {
Vector p = pos.add(x, y, z);
int minX = pos.getBlockX() - size;
int maxX = pos.getBlockX() + size;
int minY = Math.max(0, pos.getBlockY() - size);
int maxY = Math.min(127, pos.getBlockY() + size);
int minZ = pos.getBlockZ() - size;
int maxZ = pos.getBlockZ() + size;
for (int x = minX; x <= maxX; x++) {
for (int y = minY; y <= maxY; y++) {
for (int z = minZ; z <= maxZ; z++) {
Vector p = new Vector(x, y, z);
if (getBlockType(p) == blockType) {
if (setBlock(p, air)) {

Datei anzeigen

@ -76,7 +76,7 @@ public class BukkitWorld extends LocalWorld {
*/
@Override
public int getBlockType(Vector pt) {
return world.getBlockAt(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).getTypeId();
return world.getBlockTypeIdAt(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
}
/**