mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 12:36:40 +00:00
Better logger support
This commit is contained in:
@ -69,6 +69,7 @@ import static com.sk89q.worldedit.util.Direction.UP;
|
||||
import static com.sk89q.worldedit.util.Direction.WEST;
|
||||
import static com.sk89q.worldedit.util.Direction.findClosest;
|
||||
import static com.sk89q.worldedit.util.Direction.values;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
* Transforms blocks themselves (but not their position) according to a
|
||||
@ -149,7 +150,7 @@ public class BlockTransformExtent extends ResettableExtent {
|
||||
case 2:
|
||||
return adapt(combine(EAST, WEST), combine(SOUTH, NORTH));
|
||||
default:
|
||||
System.out.println("Invalid " + property.getName() + " " + property.getValues());
|
||||
getLogger(BlockTransformExtent.class).error("Invalid {} {}", property.getName(), property.getValues());
|
||||
return null;
|
||||
}
|
||||
case FACING: {
|
||||
@ -181,7 +182,7 @@ public class BlockTransformExtent extends ResettableExtent {
|
||||
result.add(notIndex(combine(NORTHEAST, NORTHWEST, SOUTHWEST, SOUTHEAST), property.getIndexFor("inner_left"), property.getIndexFor("inner_right")));
|
||||
continue;
|
||||
default:
|
||||
System.out.println("Unknown direction " + value);
|
||||
getLogger(BlockTransformExtent.class).warn("Unknown direction {}", value);
|
||||
result.add(0L);
|
||||
}
|
||||
}
|
||||
@ -221,7 +222,7 @@ public class BlockTransformExtent extends ResettableExtent {
|
||||
directions.add(combine(NORTHEAST));
|
||||
break;
|
||||
default:
|
||||
System.out.println("Unknown direction " + value);
|
||||
getLogger(BlockTransformExtent.class).warn("Unknown direction {}", value);
|
||||
directions.add(0L);
|
||||
}
|
||||
}
|
||||
|
@ -160,9 +160,9 @@ public class MaskIntersection extends AbstractMask {
|
||||
while (combineMasks(pairingFunction(), failedCombines) && --maxIteration > 0);
|
||||
|
||||
if (maxIteration == 0) {
|
||||
getLogger(MaskIntersection.class).debug("Failed optimize MaskIntersection");
|
||||
getLogger(MaskIntersection.class).error("Failed optimize MaskIntersection");
|
||||
for (Mask mask : masks) {
|
||||
System.out.println(mask.getClass() + " / " + mask);
|
||||
getLogger(MaskIntersection.class).error(mask.getClass() + " / " + mask);
|
||||
}
|
||||
}
|
||||
// Return result
|
||||
|
@ -409,7 +409,7 @@ public class EllipsoidRegion extends AbstractRegion {
|
||||
int yTopFull = Math.min(255, cy + diffYFull);
|
||||
|
||||
if (yBotFull == yTopFull || yBotFull > yTopFull) {
|
||||
System.out.println("aa");
|
||||
System.out.println("aa"); //why do we print "aa" here?
|
||||
}
|
||||
// Set those layers
|
||||
filter(chunk, filter, block, get, set, yBotFull, yTopFull, full);
|
||||
|
@ -25,6 +25,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
public class BlockTypesCache {
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
@ -203,7 +205,7 @@ public class BlockTypesCache {
|
||||
String defaultState = blockMap.remove(id);
|
||||
if (defaultState == null) {
|
||||
if (internalId != 0) {
|
||||
System.out.println("Ignoring invalid block " + id);
|
||||
getLogger(BlockTypesCache.class).info("Ignoring invalid block {}", id);
|
||||
continue;
|
||||
}
|
||||
defaultState = id;
|
||||
|
Reference in New Issue
Block a user