3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-27 03:12:37 +01:00

Fixed BlockQuirkExtent calling getBlockType().

Dieser Commit ist enthalten in:
sk89q 2014-03-31 20:31:25 -07:00
Ursprung 761904e496
Commit dbf1f3b9cb

Datei anzeigen

@ -49,16 +49,17 @@ public class BlockQuirkExtent extends ExtentDelegate {
} }
@Override @Override
public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException { public boolean setBlock(Vector position, BaseBlock block) throws WorldEditException {
final int existing = world.getBlockType(location); BaseBlock lazyBlock = getExtent().getLazyBlock(position);
int existing = lazyBlock.getType();
if (BlockType.isContainerBlock(existing)) { 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) { } 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);
} }
} }