Fix changing visual mode not updating client
This commit is contained in:
parent
9649482f59
commit
2712f5fea8
@ -294,7 +294,7 @@ public class BrushOptionsCommands extends MethodCommands {
|
||||
}
|
||||
VisualMode[] modes = VisualMode.values();
|
||||
VisualMode newMode = modes[MathMan.wrap(mode, 0, modes.length - 1)];
|
||||
tool.setVisualMode(newMode);
|
||||
tool.setVisualMode(player, newMode);
|
||||
BBC.BRUSH_VISUAL_MODE_SET.send(player, newMode);
|
||||
}
|
||||
|
||||
|
@ -474,8 +474,21 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
||||
this.targetMask = mask;
|
||||
}
|
||||
|
||||
public void setVisualMode(VisualMode visualMode) {
|
||||
public void setVisualMode(Player player, VisualMode visualMode) {
|
||||
if (visualMode == null) visualMode = VisualMode.NONE;
|
||||
if (this.visualMode != visualMode) {
|
||||
if (this.visualMode != VisualMode.NONE) {
|
||||
clear(player);
|
||||
}
|
||||
this.visualMode = visualMode != null ? visualMode : VisualMode.NONE;
|
||||
if (visualMode != VisualMode.NONE) {
|
||||
try {
|
||||
queueVisualization(FawePlayer.wrap(player));
|
||||
} catch (Throwable e) {
|
||||
WorldEdit.getInstance().getPlatformManager().handleThrowable(e, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TargetMode getTargetMode() {
|
||||
|
Loading…
Reference in New Issue
Block a user