geforkt von Mirrors/FastAsyncWorldEdit
Changed EditSession.rawSetBlock() to call setBlock() on World.
Dieser Commit ist enthalten in:
Ursprung
2bc86ea525
Commit
39d451438f
@ -37,8 +37,6 @@ import com.sk89q.worldedit.bags.UnplaceableBlockException;
|
|||||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||||
import com.sk89q.worldedit.blocks.BlockID;
|
import com.sk89q.worldedit.blocks.BlockID;
|
||||||
import com.sk89q.worldedit.blocks.BlockType;
|
import com.sk89q.worldedit.blocks.BlockType;
|
||||||
import com.sk89q.worldedit.blocks.ContainerBlock;
|
|
||||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
|
||||||
import com.sk89q.worldedit.expression.Expression;
|
import com.sk89q.worldedit.expression.Expression;
|
||||||
import com.sk89q.worldedit.expression.ExpressionException;
|
import com.sk89q.worldedit.expression.ExpressionException;
|
||||||
import com.sk89q.worldedit.expression.runtime.RValue;
|
import com.sk89q.worldedit.expression.runtime.RValue;
|
||||||
@ -222,33 +220,19 @@ public class EditSession {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean result;
|
boolean result;
|
||||||
|
|
||||||
if (world.usesBlockData(type)) {
|
if (type == 0) {
|
||||||
if (fastMode) {
|
if (fastMode) {
|
||||||
result = world.setTypeIdAndDataFast(pt, type, block.getData() > -1 ? block.getData() : 0);
|
result = world.setBlockTypeFast(pt, 0);
|
||||||
} else {
|
} else {
|
||||||
result = world.setTypeIdAndData(pt, type, block.getData() > -1 ? block.getData() : 0);
|
result = world.setBlockType(pt, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fastMode) {
|
result = world.setBlock(pt, block, fastMode);
|
||||||
result = world.setBlockTypeFast(pt, type);
|
|
||||||
} else {
|
|
||||||
result = world.setBlockType(pt, type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//System.out.println(pt + "" +result);
|
|
||||||
|
|
||||||
if (type != 0) {
|
|
||||||
if (block instanceof ContainerBlock) {
|
|
||||||
if (blockBag == null) {
|
|
||||||
world.copyToWorld(pt, block);
|
|
||||||
}
|
|
||||||
} else if (block instanceof TileEntityBlock) {
|
|
||||||
world.copyToWorld(pt, block);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren