Upstream and debugging changes.

This commit is contained in:
MattBDev
2020-01-02 16:30:44 -05:00
parent 9efdd886c5
commit 0d1e32efcb
16 changed files with 196 additions and 117 deletions

View File

@ -19,6 +19,9 @@
package com.sk89q.worldedit.function.factory;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
import com.google.common.collect.ImmutableList;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalSession;
@ -39,9 +42,6 @@ import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.sk89q.worldedit.util.GuavaUtil.firstNonNull;
public class Deform implements Contextual<Operation> {
private Extent destination;
@ -157,12 +157,6 @@ public class Deform implements Contextual<Operation> {
session == null ? WorldEdit.getInstance().getConfiguration().calculationTimeout : session.getTimeout());
}
public enum Mode {
RAW_COORD,
OFFSET,
UNIT_CUBE
}
private static final class DeformOperation implements Operation {
private final Extent destination;
private final Region region;
@ -199,9 +193,15 @@ public class Deform implements Contextual<Operation> {
@Override
public Iterable<Component> getStatusMessages() {
return ImmutableList.of(TranslatableComponent.of("worldedit.operation.deform.expression",
TextComponent.of(expression).color(TextColor.GRAY)));
TextComponent.of(expression).color(TextColor.LIGHT_PURPLE)));
}
}
public enum Mode {
RAW_COORD,
OFFSET,
UNIT_CUBE
}
}

View File

@ -38,11 +38,6 @@ import java.util.stream.Collectors;
*/
public interface Operation {
/**
* This is an internal field, and should not be touched.
*/
Set<String> warnedDeprecatedClasses = new HashSet<>();
/**
* Complete the next step. If this method returns true, then the method may
* be called again in the future, or possibly never. If this method
@ -74,6 +69,11 @@ public interface Operation {
default void addStatusMessages(List<String> messages) {
}
/**
* This is an internal field, and should not be touched.
*/
Set<String> warnedDeprecatedClasses = new HashSet<>();
/**
* Gets an iterable of messages that describe the current status of the
* operation.
@ -87,7 +87,7 @@ public interface Operation {
if (oldMessages.size() > 0) {
String className = getClass().getName();
if (!warnedDeprecatedClasses.contains(className)) {
WorldEdit.logger.warn("An operation is using the old status message API. This will be removed in further versions. Class: " + className);
WorldEdit.logger.warn("An operation is using the old status message API. This will be removed in WorldEdit 8. Class: " + className);
warnedDeprecatedClasses.add(className);
}
}