mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Fixed BlockQuirkExtent calling getBlockType().
This commit is contained in:
parent
761904e496
commit
dbf1f3b9cb
@ -49,16 +49,17 @@ public class BlockQuirkExtent extends ExtentDelegate {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
|
||||
final int existing = world.getBlockType(location);
|
||||
public boolean setBlock(Vector position, BaseBlock block) throws WorldEditException {
|
||||
BaseBlock lazyBlock = getExtent().getLazyBlock(position);
|
||||
int existing = lazyBlock.getType();
|
||||
|
||||
if (BlockType.isContainerBlock(existing)) {
|
||||
world.clearContainerBlockContents(location); // Clear the container block so that it doesn't drop items
|
||||
world.clearContainerBlockContents(position); // Clear the container block so that it doesn't drop items
|
||||
} else if (existing == BlockID.ICE) {
|
||||
world.setBlockType(location, BlockID.AIR); // Ice turns until water so this has to be done first
|
||||
world.setBlock(position, new BaseBlock(BlockID.AIR)); // Ice turns until water so this has to be done first
|
||||
}
|
||||
|
||||
return super.setBlock(location, block);
|
||||
return super.setBlock(position, block);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user