mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Upstream changes, prefix changes, formatting changes, variable name changes
I think that draining waterlogged items also works now?
This commit is contained in:
@ -42,7 +42,6 @@ import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.function.GroundFunction;
|
||||
import com.sk89q.worldedit.function.generator.FloraGenerator;
|
||||
import com.sk89q.worldedit.function.generator.ForestGenerator;
|
||||
import com.sk89q.worldedit.function.mask.ExistingBlockMask;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.mask.NoiseFilter2D;
|
||||
@ -136,7 +135,7 @@ public class RegionCommands extends MethodCommands {
|
||||
FawePlayer fp = FawePlayer.wrap(player);
|
||||
final Location loc = player.getLocation();
|
||||
FaweQueue queue = fp.getFaweQueue(false);
|
||||
fp.sendMessage(BBC.getPrefix() + "Light: " + queue.getEmmittedLight(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()) + " | " + queue.getSkyLight(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||
fp.sendMessage("Light: " + queue.getEmmittedLight(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()) + " | " + queue.getSkyLight(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||
}
|
||||
|
||||
@Command(
|
||||
@ -220,14 +219,14 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/line"},
|
||||
aliases = { "/line" },
|
||||
usage = "<pattern> [thickness]",
|
||||
desc = "Draws a line segment between cuboid selection corners",
|
||||
help =
|
||||
"Draws a line segment between cuboid selection corners.\n" +
|
||||
"Can only be used with cuboid selections.\n" +
|
||||
"Flags:\n" +
|
||||
" -h generates only a shell",
|
||||
"Draws a line segment between cuboid selection corners.\n" +
|
||||
"Can only be used with cuboid selections.\n" +
|
||||
"Flags:\n" +
|
||||
" -h generates only a shell",
|
||||
flags = "h",
|
||||
min = 1,
|
||||
max = 2
|
||||
@ -241,7 +240,7 @@ public class RegionCommands extends MethodCommands {
|
||||
@Switch('h') boolean shell) throws WorldEditException {
|
||||
|
||||
if (!(region instanceof CuboidRegion)) {
|
||||
player.printError(BBC.getPrefix() + "//line only works with cuboid selections");
|
||||
player.printError("//line only works with cuboid selections");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -258,10 +257,10 @@ public class RegionCommands extends MethodCommands {
|
||||
usage = "<pattern> [thickness]",
|
||||
desc = "Draws a spline through selected points",
|
||||
help =
|
||||
"Draws a spline through selected points.\n" +
|
||||
"Can only be used with convex polyhedral selections.\n" +
|
||||
"Flags:\n" +
|
||||
" -h generates only a shell",
|
||||
"Draws a spline through selected points.\n" +
|
||||
"Can only be used with convex polyhedral selections.\n" +
|
||||
"Flags:\n" +
|
||||
" -h generates only a shell",
|
||||
flags = "h",
|
||||
min = 1,
|
||||
max = 2
|
||||
@ -275,7 +274,7 @@ public class RegionCommands extends MethodCommands {
|
||||
@Switch('h') boolean shell,
|
||||
CommandContext context) throws WorldEditException {
|
||||
if (!(region instanceof ConvexPolyhedralRegion)) {
|
||||
player.sendMessage(BBC.getPrefix() + "//curve only works with convex polyhedral selections");
|
||||
player.sendMessage("//curve only works with convex polyhedral selections");
|
||||
return;
|
||||
}
|
||||
worldEdit.checkMaxRadius(thickness);
|
||||
@ -293,10 +292,10 @@ public class RegionCommands extends MethodCommands {
|
||||
@Command(
|
||||
aliases = { "/replace", "/re", "/rep" },
|
||||
usage = "[from-mask] <to-pattern>",
|
||||
desc = "Replace all blocks in the selection with another",
|
||||
flags = "f",
|
||||
min = 1,
|
||||
max = 2
|
||||
desc = "Replace all blocks in the selection with another",
|
||||
flags = "f",
|
||||
min = 1,
|
||||
max = 2
|
||||
)
|
||||
@CommandPermissions("worldedit.region.replace")
|
||||
@Logging(REGION)
|
||||
@ -316,7 +315,7 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/set", "/s"},
|
||||
aliases = { "/set", "/s" },
|
||||
usage = "[pattern]",
|
||||
desc = "Set all blocks within selection",
|
||||
min = 1,
|
||||
@ -336,11 +335,11 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/overlay"},
|
||||
usage = "<pattern>",
|
||||
desc = "Set a block on top of blocks in the region",
|
||||
min = 1,
|
||||
max = 1
|
||||
aliases = { "/overlay" },
|
||||
usage = "<pattern>",
|
||||
desc = "Set a block on top of blocks in the region",
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.region.overlay")
|
||||
@Logging(REGION)
|
||||
@ -386,11 +385,11 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/center", "/middle"},
|
||||
usage = "<pattern>",
|
||||
desc = "Set the center block(s)",
|
||||
min = 1,
|
||||
max = 1
|
||||
aliases = { "/center", "/middle" },
|
||||
usage = "<pattern>",
|
||||
desc = "Set the center block(s)",
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
@Logging(REGION)
|
||||
@CommandPermissions("worldedit.region.center")
|
||||
@ -400,11 +399,11 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/naturalize"},
|
||||
usage = "",
|
||||
desc = "3 layers of dirt on top then rock below",
|
||||
min = 0,
|
||||
max = 0
|
||||
aliases = { "/naturalize" },
|
||||
usage = "",
|
||||
desc = "3 layers of dirt on top then rock below",
|
||||
min = 0,
|
||||
max = 0
|
||||
)
|
||||
@CommandPermissions("worldedit.region.naturalize")
|
||||
@Logging(REGION)
|
||||
@ -416,11 +415,11 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/walls"},
|
||||
usage = "<pattern>",
|
||||
desc = "Build the four sides of the selection",
|
||||
min = 1,
|
||||
max = 1
|
||||
aliases = { "/walls" },
|
||||
usage = "<pattern>",
|
||||
desc = "Build the four sides of the selection",
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.region.walls")
|
||||
@Logging(REGION)
|
||||
@ -432,11 +431,11 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/faces", "/outline"},
|
||||
usage = "<pattern>",
|
||||
desc = "Build the walls, ceiling, and floor of a selection",
|
||||
min = 1,
|
||||
max = 1
|
||||
aliases = { "/faces", "/outline" },
|
||||
usage = "<pattern>",
|
||||
desc = "Build the walls, ceiling, and floor of a selection",
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.region.faces")
|
||||
@Logging(REGION)
|
||||
@ -458,7 +457,7 @@ public class RegionCommands extends MethodCommands {
|
||||
min = 0,
|
||||
max = 2
|
||||
)
|
||||
@CommandPermissions("worldedit.region.smoothsnow")
|
||||
@CommandPermissions("worldedit.region.smooth")
|
||||
@Logging(REGION)
|
||||
public void smooth(FawePlayer player, EditSession editSession, @Selection Region region, @Optional("1") int iterations, @Optional Mask mask, @Switch('s') boolean snow, CommandContext context) throws WorldEditException {
|
||||
BlockVector3 min = region.getMinimumPoint();
|
||||
@ -514,16 +513,16 @@ public class RegionCommands extends MethodCommands {
|
||||
|
||||
|
||||
@Command(
|
||||
aliases = {"/move"},
|
||||
aliases = { "/move" },
|
||||
usage = "[count] [direction] [leave-id]",
|
||||
flags = "sbea",
|
||||
flags = "saeb",
|
||||
desc = "Move the contents of the selection",
|
||||
help =
|
||||
"Moves the contents of the selection.\n" +
|
||||
"The -s flag shifts the selection to the target location.\n" +
|
||||
" -b also copies biomes\n" +
|
||||
" -e ignores entities\n" +
|
||||
" -a ignores air\n" +
|
||||
"The -b also copies biomes\n" +
|
||||
"The -e ignores entities\n" +
|
||||
"The -a ignores air blocks.\n" +
|
||||
"Optionally fills the old location with <leave-id>.",
|
||||
min = 0,
|
||||
max = 3
|
||||
@ -550,7 +549,7 @@ public class RegionCommands extends MethodCommands {
|
||||
session.getRegionSelector(player.getWorld()).learnChanges();
|
||||
session.getRegionSelector(player.getWorld()).explainRegionAdjust(player.getPlayer(), session);
|
||||
} catch (RegionOperationException e) {
|
||||
player.sendMessage(BBC.getPrefix() + e.getMessage());
|
||||
player.sendMessage(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -559,7 +558,7 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/fall"},
|
||||
aliases = { "/fall" },
|
||||
usage = "[replace]",
|
||||
flags = "m",
|
||||
desc = "Have the blocks in the selection fall",
|
||||
@ -583,21 +582,21 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/stack"},
|
||||
usage = "[count] [direction]",
|
||||
flags = "sam",
|
||||
desc = "Repeat the contents of the selection",
|
||||
help =
|
||||
"Repeats the contents of the selection.\n" +
|
||||
"Flags:\n" +
|
||||
" -s shifts the selection to the last stacked copy\n" +
|
||||
" -a skips air blocks",
|
||||
min = 0,
|
||||
max = 2
|
||||
aliases = { "/stack" },
|
||||
usage = "[count] [direction]",
|
||||
flags = "sam",
|
||||
desc = "Repeat the contents of the selection",
|
||||
help =
|
||||
"Repeats the contents of the selection.\n" +
|
||||
"Flags:\n" +
|
||||
" -s shifts the selection to the last stacked copy\n" +
|
||||
" -a skips air blocks",
|
||||
min = 0,
|
||||
max = 2
|
||||
)
|
||||
@CommandPermissions("worldedit.region.stack")
|
||||
@Logging(ORIENTATION_REGION)
|
||||
public void stack(FawePlayer player, LocalSession session, EditSession editSession,
|
||||
public void stack(FawePlayer player, EditSession editSession, LocalSession session,
|
||||
@Selection Region region,
|
||||
@Optional("1") @Range(min = 1) int count,
|
||||
@Optional(Direction.AIM) @Direction(includeDiagonals = true) BlockVector3 direction,
|
||||
@ -620,7 +619,7 @@ public class RegionCommands extends MethodCommands {
|
||||
session.getRegionSelector(player.getWorld()).learnChanges();
|
||||
session.getRegionSelector(player.getWorld()).explainRegionAdjust(player.getPlayer(), session);
|
||||
} catch (RegionOperationException e) {
|
||||
player.sendMessage(BBC.getPrefix() + e.getMessage());
|
||||
player.sendMessage(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -629,14 +628,14 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/deform"},
|
||||
aliases = { "/deform" },
|
||||
usage = "<expression>",
|
||||
desc = "Deforms a selected region with an expression",
|
||||
help =
|
||||
"Deforms a selected region with an expression\n" +
|
||||
"The expression is executed for each block and is expected\n" +
|
||||
"to modify the variables x, y and z to point to a new block\n" +
|
||||
"to fetch. See also tinyurl.com/wesyntax.",
|
||||
"Deforms a selected region with an expression\n" +
|
||||
"The expression is executed for each block and is expected\n" +
|
||||
"to modify the variables x, y and z to point to a new block\n" +
|
||||
"to fetch. See also tinyurl.com/wesyntax.",
|
||||
flags = "ro",
|
||||
min = 1,
|
||||
max = -1
|
||||
@ -651,6 +650,7 @@ public class RegionCommands extends MethodCommands {
|
||||
CommandContext context) throws WorldEditException {
|
||||
final Vector3 zero;
|
||||
Vector3 unit;
|
||||
|
||||
if (useRawCoords) {
|
||||
zero = Vector3.ZERO;
|
||||
unit = Vector3.ONE;
|
||||
@ -676,13 +676,13 @@ public class RegionCommands extends MethodCommands {
|
||||
player.findFreePosition();
|
||||
BBC.VISITOR_BLOCK.send(fp, affected);
|
||||
} catch (ExpressionException e) {
|
||||
fp.sendMessage(BBC.getPrefix() + e.getMessage());
|
||||
fp.sendMessage(e.getMessage());
|
||||
}
|
||||
}, getArguments(context), region, context);
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/regen"},
|
||||
aliases = { "/regen" },
|
||||
usage = "[biome] [seed]",
|
||||
desc = "Regenerates the contents of the selection",
|
||||
help =
|
||||
@ -727,15 +727,15 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/hollow"},
|
||||
usage = "[<thickness>[ <pattern>]]",
|
||||
desc = "Hollows out the object contained in this selection",
|
||||
help =
|
||||
"Hollows out the object contained in this selection.\n" +
|
||||
"Optionally fills the hollowed out part with the given block.\n" +
|
||||
"Thickness is measured in manhattan distance.",
|
||||
min = 0,
|
||||
max = 2
|
||||
aliases = { "/hollow" },
|
||||
usage = "[<thickness>[ <pattern>]]",
|
||||
desc = "Hollows out the object contained in this selection",
|
||||
help =
|
||||
"Hollows out the object contained in this selection.\n" +
|
||||
"Optionally fills the hollowed out part with the given block.\n" +
|
||||
"Thickness is measured in manhattan distance.",
|
||||
min = 0,
|
||||
max = 2
|
||||
)
|
||||
@CommandPermissions("worldedit.region.hollow")
|
||||
@Logging(REGION)
|
||||
@ -751,7 +751,7 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/forest"},
|
||||
aliases = { "/forest" },
|
||||
usage = "[type] [density]",
|
||||
desc = "Make a forest within the region",
|
||||
min = 0,
|
||||
@ -766,7 +766,7 @@ public class RegionCommands extends MethodCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/flora"},
|
||||
aliases = { "/flora" },
|
||||
usage = "[density]",
|
||||
desc = "Make flora within the region",
|
||||
min = 0,
|
||||
@ -786,5 +786,4 @@ public class RegionCommands extends MethodCommands {
|
||||
}, getArguments(context), region, context);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user