mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-09-28 23:17:29 +02:00
Possibly fixes #335
This commit is contained in:
parent
bbb6346aff
commit
b71c3ec43e
@ -46,7 +46,9 @@ public class Reload extends FaweCommand {
|
|||||||
Fawe.debug(elem);
|
Fawe.debug(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (player != null) {
|
||||||
player.sendMessage("&cSee console.");
|
player.sendMessage("&cSee console.");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "debugpaste":
|
case "debugpaste":
|
||||||
|
@ -87,6 +87,16 @@ public class CPUOptimizedChangeSet extends FaweChangeSet {
|
|||||||
return changes.iterator();
|
return changes.iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
if (changes.size() == 0) {
|
||||||
|
flush();
|
||||||
|
return changes.size() == 0;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int size() {
|
public int size() {
|
||||||
return changes.size() * 65536; // num chunks * 65536 (guess of 65536 changes per chunk)
|
return changes.size() * 65536; // num chunks * 65536 (guess of 65536 changes per chunk)
|
||||||
|
@ -170,6 +170,10 @@ public abstract class FaweChangeSet implements ChangeSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return size() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void add(int x, int y, int z, int combinedFrom, BaseBlock to) {
|
public void add(int x, int y, int z, int combinedFrom, BaseBlock to) {
|
||||||
try {
|
try {
|
||||||
if (to.hasNbtData()) {
|
if (to.hasNbtData()) {
|
||||||
|
@ -221,6 +221,15 @@ public abstract class FaweStreamChangeSet extends FaweChangeSet {
|
|||||||
return MainUtil.getCompressedOS(os, compression);
|
return MainUtil.getCompressedOS(os, compression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
if (blockSize > 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
flush();
|
||||||
|
return blockSize == 0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int size() {
|
public int size() {
|
||||||
// Flush so we can accurately get the size
|
// Flush so we can accurately get the size
|
||||||
|
@ -449,7 +449,7 @@ public class LocalSession {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FaweChangeSet changeSet = (FaweChangeSet) editSession.getChangeSet();
|
FaweChangeSet changeSet = (FaweChangeSet) editSession.getChangeSet();
|
||||||
if (changeSet.size() == 0) {
|
if (changeSet.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FawePlayer fp = editSession.getPlayer();
|
FawePlayer fp = editSession.getPlayer();
|
||||||
|
@ -300,7 +300,7 @@ public class Sniper {
|
|||||||
if (clickedBlock != null) {
|
if (clickedBlock != null) {
|
||||||
targetBlock = clickedBlock;
|
targetBlock = clickedBlock;
|
||||||
lastBlock = clickedBlock.getRelative(clickedFace);
|
lastBlock = clickedBlock.getRelative(clickedFace);
|
||||||
if (lastBlock == null) {
|
if (lastBlock == null || targetBlock == null) {
|
||||||
getPlayer().sendMessage(ChatColor.RED + "Snipe target block must be visible.");
|
getPlayer().sendMessage(ChatColor.RED + "Snipe target block must be visible.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user