Add targetoffset scroll action
This commit is contained in:
parent
c6605ce587
commit
ca1a62ac79
@ -64,6 +64,8 @@ public abstract class ScrollAction implements ScrollTool {
|
||||
patterns[i - 1] = WorldEdit.getInstance().getPatternFactory().parseFromInput(arg, parserContext);
|
||||
}
|
||||
return (new ScrollPattern(tool, patterns));
|
||||
case "targetoffset":
|
||||
return (new ScrollTargetOffset(tool));
|
||||
case "range":
|
||||
return (new ScrollRange(tool));
|
||||
case "size":
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.boydti.fawe.object.brush.scroll;
|
||||
|
||||
import com.boydti.fawe.util.MathMan;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.command.tool.BrushTool;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
|
||||
public class ScrollTargetOffset extends ScrollAction {
|
||||
public ScrollTargetOffset(BrushTool tool) {
|
||||
super(tool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean increment(Player player, int amount) {
|
||||
BrushTool tool = getTool();
|
||||
tool.setTargetOffset(tool.getTargetOffset() + amount);
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user