9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00
This commit is contained in:
XiaoMoMi
2025-10-13 00:08:19 +08:00
parent fd7167d66f
commit f4224c1676
4 changed files with 5 additions and 5 deletions

View File

@@ -2056,8 +2056,6 @@ public class BukkitNetworkManager implements NetworkManager, Listener, PluginMes
buf.writeBitSet(emptyBlockYMask);
buf.writeByteArrayList(skyUpdates);
buf.writeByteArrayList(blockUpdates);
} else {
System.out.println("没变化啊");
}
// 记录加载的区块

View File

@@ -53,7 +53,7 @@ public class Int2ObjectBiMap<K> implements IndexedIterable<K> {
if (prev == null) break;
K apply = function.apply(prev);
values[i] = apply;
if (apply != prev) {
if (!apply.equals(prev)) {
changed = true;
}
}

View File

@@ -122,7 +122,7 @@ public class ArrayPalette<T> implements Palette<T> {
if (prev == null) return changed;
T newV = function.apply(prev);
this.array[i] = newV;
if (newV != prev) {
if (!newV.equals(prev)) {
changed = true;
}
}

View File

@@ -70,14 +70,16 @@ public class SingularPalette<T> implements Palette<T> {
@Override
public void remap(Function<T, T> function) {
if (this.entry == null) return;
this.entry = function.apply(this.entry);
}
@Override
public boolean remapAndCheck(Function<T, T> function) {
if (this.entry == null) return false;
T previous = this.entry;
this.entry = function.apply(previous);
return previous == this.entry;
return !previous.equals(this.entry);
}
@Override