mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 09:17:39 +00:00
fix: compound tags can be nullable when converting state to baseblock (#2914)
This commit is contained in:
parent
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user