3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-07 20:10:06 +01:00

Various minor fixes

Fix drain
Fix some messages lacking prefix
Fix non persistent brushes
Dieser Commit ist enthalten in:
Jesse Boyd 2018-10-13 15:15:20 +11:00
Ursprung 1b7ac7a0bc
Commit 1a12c065a1
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
6 geänderte Dateien mit 24 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -33,7 +33,6 @@ public class VoxelList
public void add(BlockMask mask)
{
this.mask = (BlockMask) mask.and(mask);
}

Datei anzeigen

@ -2018,7 +2018,7 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
MaskIntersection mask = new MaskIntersection(
new BoundedHeightMask(0, Math.min(origin.getBlockY(), getMaximumPoint().getBlockY())),
new RegionMask(new EllipsoidRegion(null, origin, new Vector(radius, radius, radius))),
liquidMask, new BlockTypeMask(this, BlockTypes.AIR, BlockTypes.CAVE_AIR, BlockTypes.VOID_AIR));
liquidMask);
BlockReplace replace = new BlockReplace(this, BlockTypes.AIR.getDefaultState());
NonRisingVisitor visitor = new NonRisingVisitor(mask, replace, (int) (radius * 2 + 1), this);

Datei anzeigen

@ -1043,6 +1043,15 @@ public class LocalSession implements TextureHolder {
} else {
previous = this.tools[type.getInternalId()];
this.tools[type.getInternalId()] = tool;
if (tool != null) {
hasTool = true;
} else {
hasTool = false;
for (Tool i : this.tools) if (i != null) {
hasTool = true;
break;
}
}
}
if (previous != null && player != null && previous instanceof BrushTool) {
BrushTool brushTool = (BrushTool) previous;

Datei anzeigen

@ -19,6 +19,7 @@
package com.sk89q.worldedit.command.composition;
import com.boydti.fawe.config.BBC;
import com.sk89q.minecraft.util.commands.CommandException;
import com.sk89q.minecraft.util.commands.CommandLocals;
import com.sk89q.minecraft.util.commands.CommandPermissionsException;
@ -79,7 +80,7 @@ public class ShapedBrushCommand extends SimpleCommand<Object> {
WorldEdit.getInstance().getPlatformManager().getCommandManager().getExceptionConverter().convert(e);
}
player.print("Set brush to " + factory);
player.print(BBC.getPrefix() + "Set brush to " + factory);
return true;
}

Datei anzeigen

@ -476,9 +476,9 @@ public final class CommandManager {
} catch (CommandException e) {
String message = e.getMessage();
if (message != null) {
actor.printError(e.getMessage());
actor.printError(BBC.getPrefix() + e.getMessage());
} else {
actor.printError("An unknown FAWE error has occurred! Please see console.");
actor.printError(BBC.getPrefix() + "An unknown FAWE error has occurred! Please see console.");
log.log(Level.SEVERE, "An unknown FAWE error occurred", e);
}
} catch (Throwable e) {
@ -487,7 +487,7 @@ public final class CommandManager {
if (faweException != null) {
BBC.WORLDEDIT_CANCEL_REASON.send(actor, faweException.getMessage());
} else {
actor.printError("There was an error handling a FAWE command: [See console]");
actor.printError(BBC.getPrefix() + "There was an error handling a FAWE command: [See console]");
actor.printRaw(e.getClass().getName() + ": " + e.getMessage());
log.log(Level.SEVERE, "An unexpected error occurred while handling a FAWE command", e);
}

Datei anzeigen

@ -48,6 +48,15 @@ public class MaskIntersection extends AbstractMask {
formArray();
}
/**
* Create a new intersection.
*
* @param mask a list of masks
*/
public MaskIntersection(Mask... mask) {
this(Arrays.asList(checkNotNull(mask)));
}
private void formArray() {
if (masks.isEmpty()) {
masksArray = new Mask[]{Masks.alwaysFalse()};
@ -123,15 +132,6 @@ public class MaskIntersection extends AbstractMask {
return hasOptimized;
}
/**
* Create a new intersection.
*
* @param mask a list of masks
*/
public MaskIntersection(Mask... mask) {
this(Arrays.asList(checkNotNull(mask)));
}
/**
* Add some masks to the list.
*