mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:28:35 +00:00
wip history changes
This commit is contained in:
@ -21,7 +21,7 @@ import com.boydti.fawe.object.RegionWrapper;
|
||||
import com.boydti.fawe.object.brush.visualization.VirtualWorld;
|
||||
import com.boydti.fawe.object.changeset.BlockBagChangeSet;
|
||||
import com.boydti.fawe.object.changeset.DiskStorageHistory;
|
||||
import com.boydti.fawe.object.changeset.FaweChangeSet;
|
||||
import com.boydti.fawe.object.changeset.AbstractChangeSet;
|
||||
import com.boydti.fawe.object.changeset.MemoryOptimizedHistory;
|
||||
import com.boydti.fawe.object.extent.FaweRegionExtent;
|
||||
import com.boydti.fawe.object.extent.MultiRegionExtent;
|
||||
@ -49,7 +49,7 @@ public class EditSessionBuilder {
|
||||
private String worldName;
|
||||
private Player player;
|
||||
private FaweLimit limit;
|
||||
private FaweChangeSet changeSet;
|
||||
private AbstractChangeSet changeSet;
|
||||
private Region[] allowedRegions;
|
||||
private Boolean autoQueue;
|
||||
private Boolean fastmode;
|
||||
@ -116,7 +116,7 @@ public class EditSessionBuilder {
|
||||
return setDirty();
|
||||
}
|
||||
|
||||
public EditSessionBuilder changeSet(@Nullable FaweChangeSet changeSet) {
|
||||
public EditSessionBuilder changeSet(@Nullable AbstractChangeSet changeSet) {
|
||||
this.changeSet = changeSet;
|
||||
return setDirty();
|
||||
}
|
||||
@ -265,7 +265,7 @@ public class EditSessionBuilder {
|
||||
return extent;
|
||||
}
|
||||
|
||||
private FaweChangeSet changeTask;
|
||||
private AbstractChangeSet changeTask;
|
||||
private int maxY;
|
||||
private Extent bypassHistory;
|
||||
private Extent bypassAll;
|
||||
@ -493,7 +493,7 @@ public class EditSessionBuilder {
|
||||
return player;
|
||||
}
|
||||
|
||||
public FaweChangeSet getChangeTask() {
|
||||
public AbstractChangeSet getChangeTask() {
|
||||
return changeTask;
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,17 @@ public class StringMan {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static String humanReadableByteCountBin(long bytes) {
|
||||
long b = bytes == Long.MIN_VALUE ? Long.MAX_VALUE : Math.abs(bytes);
|
||||
return b < 1024L ? bytes + " B"
|
||||
: b <= 0xfffccccccccccccL >> 40 ? String.format("%.1f KiB", bytes / 0x1p10)
|
||||
: b <= 0xfffccccccccccccL >> 30 ? String.format("%.1f MiB", bytes / 0x1p20)
|
||||
: b <= 0xfffccccccccccccL >> 20 ? String.format("%.1f GiB", bytes / 0x1p30)
|
||||
: b <= 0xfffccccccccccccL >> 10 ? String.format("%.1f TiB", bytes / 0x1p40)
|
||||
: b <= 0xfffccccccccccccL ? String.format("%.1f PiB", (bytes >> 10) / 0x1p40)
|
||||
: String.format("%.1f EiB", (bytes >> 20) / 0x1p40);
|
||||
}
|
||||
|
||||
public static String prettyFormat(double d) {
|
||||
if (d == Double.MIN_VALUE || d == Double.NEGATIVE_INFINITY) return "-∞";
|
||||
if (d == Double.MAX_VALUE || d == Double.POSITIVE_INFINITY) return "∞";
|
||||
|
Reference in New Issue
Block a user