geforkt von Mirrors/FastAsyncWorldEdit
Check by setting blocks with BlockBagExtend for changed materials.
Dieser Commit ist enthalten in:
Ursprung
be0d21e2a9
Commit
a73faf0c8b
@ -86,25 +86,27 @@ public class BlockBagExtent extends AbstractDelegateExtent {
|
|||||||
if (blockBag != null) {
|
if (blockBag != null) {
|
||||||
BlockState existing = getExtent().getBlock(position);
|
BlockState existing = getExtent().getBlock(position);
|
||||||
|
|
||||||
if (!block.getBlockType().getMaterial().isAir()) {
|
if (!block.getBlockType().equals(existing.getBlockType())) {
|
||||||
try {
|
if (!block.getBlockType().getMaterial().isAir()) {
|
||||||
blockBag.fetchPlacedBlock(block.toImmutableState());
|
try {
|
||||||
} catch (UnplaceableBlockException e) {
|
blockBag.fetchPlacedBlock(block.toImmutableState());
|
||||||
return false;
|
} catch (UnplaceableBlockException e) {
|
||||||
} catch (BlockBagException e) {
|
return false;
|
||||||
if (!missingBlocks.containsKey(block.getBlockType())) {
|
} catch (BlockBagException e) {
|
||||||
missingBlocks.put(block.getBlockType(), 1);
|
if (!missingBlocks.containsKey(block.getBlockType())) {
|
||||||
} else {
|
missingBlocks.put(block.getBlockType(), 1);
|
||||||
missingBlocks.put(block.getBlockType(), missingBlocks.get(block.getBlockType()) + 1);
|
} else {
|
||||||
|
missingBlocks.put(block.getBlockType(), missingBlocks.get(block.getBlockType()) + 1);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!existing.getBlockType().getMaterial().isAir()) {
|
if (!existing.getBlockType().getMaterial().isAir()) {
|
||||||
try {
|
try {
|
||||||
blockBag.storeDroppedBlock(existing);
|
blockBag.storeDroppedBlock(existing);
|
||||||
} catch (BlockBagException ignored) {
|
} catch (BlockBagException ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren