3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Added a "pos1" pseudo block type, which uses the block type from the "primary position".

Dieser Commit ist enthalten in:
TomyLobo 2013-11-24 16:54:01 +01:00
Ursprung 768adee389
Commit 1b9445b6f2

Datei anzeigen

@ -404,6 +404,18 @@ public class WorldEdit {
return blockInHand;
}
blockId = blockInHand.getId();
blockType = BlockType.fromID(blockId);
data = blockInHand.getData();
} else if ("pos1".equalsIgnoreCase(testID)) {
// Get the block type from the "primary position"
final LocalWorld world = player.getWorld();
final BlockVector primaryPosition = getSession(player).getRegionSelector(world).getPrimaryPosition();
final BaseBlock blockInHand = world.getBlock(primaryPosition);
if (blockInHand.getClass() != BaseBlock.class) {
return blockInHand;
}
blockId = blockInHand.getId();
blockType = BlockType.fromID(blockId);
data = blockInHand.getData();