geforkt von Mirrors/FastAsyncWorldEdit
Fixed BlockBagExtent using getBlockType/Data()
Dieser Commit ist enthalten in:
Ursprung
dbf1f3b9cb
Commit
302e493538
@ -87,10 +87,11 @@ public class BlockBagExtent extends ExtentDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
|
public boolean setBlock(Vector position, BaseBlock block) throws WorldEditException {
|
||||||
if (blockBag != null) {
|
if (blockBag != null) {
|
||||||
|
BaseBlock lazyBlock = getExtent().getLazyBlock(position);
|
||||||
|
int existing = lazyBlock.getType();
|
||||||
final int type = block.getType();
|
final int type = block.getType();
|
||||||
final int existing = world.getBlockType(location);
|
|
||||||
|
|
||||||
if (type > 0) {
|
if (type > 0) {
|
||||||
try {
|
try {
|
||||||
@ -109,12 +110,12 @@ public class BlockBagExtent extends ExtentDelegate {
|
|||||||
|
|
||||||
if (existing > 0) {
|
if (existing > 0) {
|
||||||
try {
|
try {
|
||||||
blockBag.storeDroppedBlock(existing, world.getBlockData(location));
|
blockBag.storeDroppedBlock(existing, lazyBlock.getData());
|
||||||
} catch (BlockBagException ignored) {
|
} catch (BlockBagException ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.setBlock(location, block);
|
return super.setBlock(position, block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren