mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Changed EditSession.rawSetBlock() to call setBlock() on World.
This commit is contained in:
parent
2bc86ea525
commit
39d451438f
@ -37,8 +37,6 @@ import com.sk89q.worldedit.bags.UnplaceableBlockException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
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.ExpressionException;
|
||||
import com.sk89q.worldedit.expression.runtime.RValue;
|
||||
@ -223,32 +221,18 @@ public class EditSession {
|
||||
}
|
||||
}
|
||||
|
||||
final boolean result;
|
||||
boolean result;
|
||||
|
||||
if (world.usesBlockData(type)) {
|
||||
if (type == 0) {
|
||||
if (fastMode) {
|
||||
result = world.setTypeIdAndDataFast(pt, type, block.getData() > -1 ? block.getData() : 0);
|
||||
result = world.setBlockTypeFast(pt, 0);
|
||||
} else {
|
||||
result = world.setTypeIdAndData(pt, type, block.getData() > -1 ? block.getData() : 0);
|
||||
result = world.setBlockType(pt, 0);
|
||||
}
|
||||
} else {
|
||||
if (fastMode) {
|
||||
result = world.setBlockTypeFast(pt, type);
|
||||
} else {
|
||||
result = world.setBlockType(pt, type);
|
||||
result = world.setBlock(pt, block, fastMode);
|
||||
}
|
||||
}
|
||||
//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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user