Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ public MutableBiomeChange read() {
} catch (EOFException ignored) {
} catch (Exception e) {
e.printStackTrace();
e.printStackTrace();
}
try {
is.close();
Expand Down Expand Up @@ -562,7 +561,10 @@ public Iterator<Change> getIterator(BlockBag blockBag, int mode, boolean redo) {

public Iterator<MutableFullBlockChange> getFullBlockIterator(BlockBag blockBag, int inventory, final boolean dir) throws
IOException {
final FaweInputStream is = new FaweInputStream(getBlockIS());
final FaweInputStream is = getBlockIS();
if (is == null) {
return Collections.emptyIterator();
}
final MutableFullBlockChange change = new MutableFullBlockChange(blockBag, inventory, dir);
return new Iterator<MutableFullBlockChange>() {
private MutableFullBlockChange last = read();
Expand All @@ -577,7 +579,6 @@ public MutableFullBlockChange read() {
} catch (EOFException ignored) {
} catch (Exception e) {
e.printStackTrace();
e.printStackTrace();
}
try {
is.close();
Expand Down Expand Up @@ -850,7 +851,7 @@ protected void write(final MutableEntityChange change, final CompoundTag tag) {

@Override
public boolean accepts(final Change change) {
return change instanceof MutableTileChange;
return change instanceof MutableEntityChange;
}

}
Expand Down Expand Up @@ -1065,13 +1066,16 @@ public SimpleChangeSetSummary summarize(Region region, boolean shallow) {
return summary;
}
try (FaweInputStream fis = getBlockIS()) {
if (fis == null) {
return summary;
}
if (!shallow) {
int amount = (Settings.settings().HISTORY.BUFFER_SIZE - HEADER_SIZE) / 9;
MutableFullBlockChange change = new MutableFullBlockChange(null, 0, false);
for (int i = 0; i < amount; i++) {
int x = posDel.readX(fis) + ox;
int y = posDel.readY(fis);
int z = posDel.readZ(fis) + ox;
int z = posDel.readZ(fis) + oz;
idDel.readCombined(fis, change);
summary.add(x, z, change.to);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ default void setSkyLight(int x, int y, int z, int value) {
@Override
default void setBlockLight(int x, int y, int z, int value) {
final IChunk chunk = getOrCreateChunk(x >> 4, z >> 4);
chunk.setSkyLight(x & 15, y, z & 15, value);
chunk.setBlockLight(x & 15, y, z & 15, value);
}

@Override
Expand Down
Loading