Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Fixes #402
- Similar to previous commit. If the chunksection was empty, then __reserved__ was parsed to the clipboard, and then not correctly identified as air - Now assume all __reserved__ is air when writing to clipboards
Dieser Commit ist enthalten in:
Ursprung
ffa25b1d9a
Commit
42d7419b4b
@ -184,7 +184,11 @@ public class CPUOptimizedClipboard extends LinearClipboard {
|
||||
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(int index, B block) {
|
||||
states[index] = block.getOrdinalChar();
|
||||
char ordinal = block.getOrdinalChar();
|
||||
if (ordinal == 0) {
|
||||
ordinal = 1;
|
||||
}
|
||||
states[index] = ordinal;
|
||||
boolean hasNbt = block instanceof BaseBlock && block.hasNbtData();
|
||||
if (hasNbt) {
|
||||
setTile(index, block.getNbtData());
|
||||
|
@ -388,6 +388,9 @@ public class DiskOptimizedClipboard extends LinearClipboard implements Closeable
|
||||
try {
|
||||
int index = HEADER_SIZE + (getIndex(x, y, z) << 1);
|
||||
char ordinal = block.getOrdinalChar();
|
||||
if (ordinal == 0) {
|
||||
ordinal = 1;
|
||||
}
|
||||
byteBuffer.putChar(index, ordinal);
|
||||
boolean hasNbt = block instanceof BaseBlock && block.hasNbtData();
|
||||
if (hasNbt) {
|
||||
|
@ -263,6 +263,9 @@ public class MemoryOptimizedClipboard extends LinearClipboard {
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(int index, B block) {
|
||||
int ordinal = block.getOrdinal();
|
||||
if (ordinal == 0) {
|
||||
ordinal = 1;
|
||||
}
|
||||
setOrdinal(index, ordinal);
|
||||
boolean hasNbt = block instanceof BaseBlock && block.hasNbtData();
|
||||
if (hasNbt) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren