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

Update for SpoutAPI scheduler and lighting changes

Dieser Commit ist enthalten in:
zml2008 2012-05-26 11:34:26 -07:00
Ursprung b22921ffa6
Commit 379189f224
4 geänderte Dateien mit 7 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -31,6 +31,7 @@ import org.spout.api.Engine;
import org.spout.api.geo.World;
import org.spout.api.material.Material;
import org.spout.api.material.MaterialRegistry;
import org.spout.api.scheduler.TaskPriority;
import java.lang.reflect.Method;
import java.util.ArrayList;
@ -74,7 +75,7 @@ public class SpoutServerInterface extends ServerInterface {
@Override
public int schedule(long delay, long period, Runnable task) {
return game.getScheduler().scheduleSyncRepeatingTask(plugin, task, delay, period);
return game.getScheduler().scheduleSyncRepeatingTask(plugin, task, delay * 50, period * 50, TaskPriority.NORMAL);
}
@Override

Datei anzeigen

@ -192,7 +192,7 @@ public class SpoutWorld extends LocalWorld {
*/
@Override
public int getBlockLightLevel(Vector pt) {
return world.getBlockMaterial(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).getLightLevel();
return world.getBlockLight(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
}
/**

Datei anzeigen

@ -39,6 +39,7 @@ import org.spout.api.event.server.PreCommandEvent;
import org.spout.api.event.world.WorldLoadEvent;
import org.spout.api.generator.biome.BiomeGenerator;
import org.spout.api.geo.discrete.Point;
import org.spout.api.scheduler.TaskPriority;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -140,7 +141,7 @@ public class WorldEditListener implements Listener {
public void run() {
ignoreLeftClickAir = false;
}
}, 2);
}, 100, TaskPriority.NORMAL);
if (taskId != -1) {
ignoreLeftClickAir = true;

Datei anzeigen

@ -36,6 +36,7 @@ import org.spout.api.command.CommandSource;
import org.spout.api.geo.World;
import org.spout.api.player.Player;
import org.spout.api.plugin.CommonPlugin;
import org.spout.api.scheduler.TaskPriority;
import org.spout.api.util.Named;
import java.io.*;
@ -100,7 +101,7 @@ public class WorldEditPlugin extends CommonPlugin implements Named {
registerEvents();
getGame().getScheduler().scheduleAsyncRepeatingTask(this,
new SessionTimer(controller, getGame()), 120, 120);
new SessionTimer(controller, getGame()), 6 * 1000, 6 * 1000, TaskPriority.LOWEST);
}
/**