Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 18:40:05 +01:00
fix: compound tags can be nullable when converting state to baseblock (#2914)
Dieser Commit ist enthalten in:
Ursprung
f820cb2fb4
Commit
49b063a187
@ -263,8 +263,7 @@ public class CharFilterBlock extends ChunkFilterBlock {
|
||||
final BlockMaterial material = state.getMaterial();
|
||||
if (material.hasContainer()) {
|
||||
final FaweCompoundTag tag = get.tile(x, y + yy, z);
|
||||
assert tag != null : "has container but is null";
|
||||
return state.toBaseBlock(tag.linTag());
|
||||
return state.toBaseBlock(tag == null ? null : tag.linTag());
|
||||
}
|
||||
return state.toBaseBlock();
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ public enum CompoundInput {
|
||||
@Override
|
||||
public BaseBlock get(final BlockState state, final IBlocks blocks, final int x, final int y, final int z) {
|
||||
final FaweCompoundTag tile = blocks.tile(x, y, z);
|
||||
assert tile != null : "container without tile entity";
|
||||
return state.toBaseBlock(tile.linTag());
|
||||
return state.toBaseBlock(tile == null ? null : tile.linTag());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -427,7 +427,7 @@ public class AbstractDelegateExtent implements Extent {
|
||||
|
||||
@Override
|
||||
public boolean tile(int x, int y, int z, FaweCompoundTag tile) throws WorldEditException {
|
||||
return setBlock(x, y, z, getBlock(x, y, z).toBaseBlock(tile.linTag()));
|
||||
return setBlock(x, y, z, getBlock(x, y, z).toBaseBlock(tile == null ? null : tile.linTag()));
|
||||
}
|
||||
//FAWE end
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren