Clear shaped brush material on command.

The initial material is held in the factory, but if a brush was previously bound, that pattern is used.
Now, using `//br set` will clear the previous material, allowing the OperationFactory's material to work.
This can be changed later with `/mat`, which will once again set the fill on the tool, overriding the factory's context.
This commit is contained in:
wizjany 2019-02-15 14:51:26 -05:00 committed by GitHub
parent 319f2efe43
commit de9d202681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,7 @@ public class ShapedBrushCommand extends SimpleCommand<Object> {
WorldEdit.getInstance().checkMaxBrushRadius(radius);
BrushTool tool = session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType());
tool.setSize(radius);
tool.setFill(null);
tool.setBrush(new OperationFactoryBrush(factory, regionFactory), permission);
} catch (MaxBrushRadiusException | InvalidToolBindException e) {
WorldEdit.getInstance().getPlatformManager().getCommandManager().getExceptionConverter().convert(e);