geforkt von Mirrors/FastAsyncWorldEdit
Remove the -l lightning flag from butcher
Dieser Commit ist enthalten in:
Ursprung
23279c007e
Commit
968decf62e
@ -86,8 +86,6 @@ subprojects {
|
||||
mavenCentral()
|
||||
maven { url "http://maven.sk89q.com/repo/" }
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
// temporary, for Piston
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,9 +257,7 @@ public class BrushCommands {
|
||||
@Switch(name = 'f', desc = "Also kill all friendly mobs (Applies the flags `-abgnpt`)")
|
||||
boolean killFriendly,
|
||||
@Switch(name = 'r', desc = "Also destroy armor stands")
|
||||
boolean killArmorStands,
|
||||
@Switch(name = 'l', desc = "Kill via lightning. Currently non-functioning.")
|
||||
boolean killWithLightning) throws WorldEditException {
|
||||
boolean killArmorStands) throws WorldEditException {
|
||||
LocalConfiguration config = worldEdit.getConfiguration();
|
||||
|
||||
double maxRadius = config.maxBrushRadius;
|
||||
@ -284,8 +282,6 @@ public class BrushCommands {
|
||||
flags.or(CreatureButcher.Flags.TAGGED , killWithName, "worldedit.butcher.tagged");
|
||||
flags.or(CreatureButcher.Flags.ARMOR_STAND , killArmorStands, "worldedit.butcher.armorstands");
|
||||
|
||||
flags.or(CreatureButcher.Flags.WITH_LIGHTNING, killWithLightning, "worldedit.butcher.lightning");
|
||||
|
||||
BrushTool tool = session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType());
|
||||
tool.setSize(radius);
|
||||
tool.setBrush(new ButcherBrush(flags), "worldedit.brush.butcher");
|
||||
|
@ -375,9 +375,7 @@ public class UtilityCommands {
|
||||
@Switch(name = 'f', desc = "Also kill all friendly mobs (Applies the flags `-abgnpt`)")
|
||||
boolean killFriendly,
|
||||
@Switch(name = 'r', desc = "Also destroy armor stands")
|
||||
boolean killArmorStands,
|
||||
@Switch(name = 'l', desc = "Kill via lightning. Currently non-functioning.")
|
||||
boolean killWithLightning) throws WorldEditException {
|
||||
boolean killArmorStands) throws WorldEditException {
|
||||
LocalConfiguration config = we.getConfiguration();
|
||||
Player player = actor instanceof Player ? (Player) actor : null;
|
||||
|
||||
@ -406,8 +404,6 @@ public class UtilityCommands {
|
||||
flags.or(CreatureButcher.Flags.TAGGED, killWithName, "worldedit.butcher.tagged");
|
||||
flags.or(CreatureButcher.Flags.ARMOR_STAND, killArmorStands, "worldedit.butcher.armorstands");
|
||||
|
||||
flags.or(CreatureButcher.Flags.WITH_LIGHTNING, killWithLightning, "worldedit.butcher.lightning");
|
||||
|
||||
int killed = killMatchingEntities(radius, player, flags::createFunction);
|
||||
|
||||
actor.print("Killed " + killed + (killed != 1 ? " mobs" : " mob") + (radius < 0 ? "" : " in a radius of " + radius) + ".");
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.command.util;
|
||||
|
||||
import com.sk89q.minecraft.util.commands.CommandContext;
|
||||
import com.sk89q.worldedit.entity.metadata.EntityProperties;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.function.EntityFunction;
|
||||
@ -39,7 +38,6 @@ public class CreatureButcher {
|
||||
public static final int TAGGED = 1 << 5;
|
||||
public static final int FRIENDLY = PETS | NPCS | ANIMALS | GOLEMS | AMBIENT | TAGGED;
|
||||
public static final int ARMOR_STAND = 1 << 6;
|
||||
public static final int WITH_LIGHTNING = 1 << 20;
|
||||
|
||||
private Flags() {
|
||||
}
|
||||
@ -64,19 +62,6 @@ public class CreatureButcher {
|
||||
}
|
||||
}
|
||||
|
||||
public void fromCommand(CommandContext args) {
|
||||
or(Flags.FRIENDLY , args.hasFlag('f')); // No permission check here. Flags will instead be filtered by the subsequent calls.
|
||||
or(Flags.PETS , args.hasFlag('p'), "worldedit.butcher.pets");
|
||||
or(Flags.NPCS , args.hasFlag('n'), "worldedit.butcher.npcs");
|
||||
or(Flags.GOLEMS , args.hasFlag('g'), "worldedit.butcher.golems");
|
||||
or(Flags.ANIMALS , args.hasFlag('a'), "worldedit.butcher.animals");
|
||||
or(Flags.AMBIENT , args.hasFlag('b'), "worldedit.butcher.ambient");
|
||||
or(Flags.TAGGED , args.hasFlag('t'), "worldedit.butcher.tagged");
|
||||
or(Flags.ARMOR_STAND , args.hasFlag('r'), "worldedit.butcher.armorstands");
|
||||
|
||||
or(Flags.WITH_LIGHTNING, args.hasFlag('l'), "worldedit.butcher.lightning");
|
||||
}
|
||||
|
||||
public EntityFunction createFunction() {
|
||||
return entity -> {
|
||||
boolean killPets = (flags & Flags.PETS) != 0;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren