Remove a tonne of code from WorldEdit. This breaks backwards compatibility. More will be removed. Sorry :)

This commit is contained in:
Matthew Miller
2018-06-15 15:41:37 +10:00
parent b292a39765
commit c537a2e948
67 changed files with 139 additions and 2615 deletions

View File

@ -26,8 +26,9 @@ import com.sk89q.worldedit.*;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.ItemType;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.patterns.Pattern;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.command.tool.*;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.util.TreeGenerator;
public class ToolCommands {
@ -139,7 +140,12 @@ public class ToolCommands {
return;
}
Pattern pattern = we.getBlockPattern(player, args.getString(0));
ParserContext context = new ParserContext();
context.setActor(player);
context.setWorld(player.getWorld());
context.setSession(session);
Pattern pattern = we.getPatternFactory().parseFromInput(args.getString(0), context);
session.setTool(player.getItemInHand(), new FloodFillTool(range, pattern));
player.print("Block flood fill tool bound to "
+ ItemType.toHeldName(player.getItemInHand()) + ".");