mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-01 07:03:52 +01:00
Fixes #514
This commit is contained in:
parent
81b60f75cf
commit
45827b611d
@ -4,6 +4,7 @@ import com.boydti.fawe.Fawe;
|
|||||||
import com.boydti.fawe.FaweCache;
|
import com.boydti.fawe.FaweCache;
|
||||||
import com.boydti.fawe.config.BBC;
|
import com.boydti.fawe.config.BBC;
|
||||||
import com.boydti.fawe.object.FawePlayer;
|
import com.boydti.fawe.object.FawePlayer;
|
||||||
|
import com.boydti.fawe.object.RunnableVal;
|
||||||
import com.boydti.fawe.object.brush.BrushSettings;
|
import com.boydti.fawe.object.brush.BrushSettings;
|
||||||
import com.boydti.fawe.object.brush.MovableTool;
|
import com.boydti.fawe.object.brush.MovableTool;
|
||||||
import com.boydti.fawe.object.brush.ResettableTool;
|
import com.boydti.fawe.object.brush.ResettableTool;
|
||||||
@ -16,6 +17,7 @@ import com.boydti.fawe.object.brush.visualization.VisualMode;
|
|||||||
import com.boydti.fawe.object.extent.ResettableExtent;
|
import com.boydti.fawe.object.extent.ResettableExtent;
|
||||||
import com.boydti.fawe.object.pattern.PatternTraverser;
|
import com.boydti.fawe.object.pattern.PatternTraverser;
|
||||||
import com.boydti.fawe.util.EditSessionBuilder;
|
import com.boydti.fawe.util.EditSessionBuilder;
|
||||||
|
import com.boydti.fawe.util.TaskManager;
|
||||||
import com.sk89q.worldedit.BlockWorldVector;
|
import com.sk89q.worldedit.BlockWorldVector;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
import com.sk89q.worldedit.LocalConfiguration;
|
import com.sk89q.worldedit.LocalConfiguration;
|
||||||
@ -281,11 +283,16 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
|||||||
|
|
||||||
private Vector trace(Player player, int range, boolean useLastBlock) {
|
private Vector trace(Player player, int range, boolean useLastBlock) {
|
||||||
TargetBlock tb = new TargetBlock(player, range, 0.2);
|
TargetBlock tb = new TargetBlock(player, range, 0.2);
|
||||||
BlockWorldVector result = tb.getSolidTargetBlock();
|
return TaskManager.IMP.sync(new RunnableVal<Vector>() {
|
||||||
if (result == null && useLastBlock) {
|
@Override
|
||||||
result = tb.getPreviousBlock();
|
public void run(Vector value) {
|
||||||
}
|
BlockWorldVector result = tb.getSolidTargetBlock();
|
||||||
return result;
|
if (result == null && useLastBlock) {
|
||||||
|
result = tb.getPreviousBlock();
|
||||||
|
}
|
||||||
|
this.value = result;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean act(BrushAction action, Platform server, LocalConfiguration config, Player player, LocalSession session) {
|
public boolean act(BrushAction action, Platform server, LocalConfiguration config, Player player, LocalSession session) {
|
||||||
|
Loading…
Reference in New Issue
Block a user