diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
commit | 2922421f4a88e56a0a1c819f62bf2bc287835388 (patch) | |
tree | b6dafb3d00ef05778e456716c03544279c2978fa /worldedit | |
parent | 67d414d2f9aa5999e3f1755543a68455b4bb6d99 (diff) | |
download | dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.gz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.bz2 dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.xz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.zip |
Update several mods:
biome_lib, boost_cart, building_blocks, castle, homedecor, glooptest,
currency, roads, invsaw, maptools, mesecons, moreblocks, nixie_tubes,
pipeworks, signs_lib, technic, unified_inventory, unifiedbricks, worldedit,
xban2
Diffstat (limited to 'worldedit')
-rw-r--r-- | worldedit/primitives.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/worldedit/primitives.lua b/worldedit/primitives.lua index 962a02f..fe22fff 100644 --- a/worldedit/primitives.lua +++ b/worldedit/primitives.lua @@ -150,8 +150,9 @@ end -- @param axis Axis ("x", "y", or "z")
-- @param height Pyramid height.
-- @param node_name Name of node to make pyramid of.
+-- @param hollow Whether the pyramid should be hollow.
-- @return The number of nodes added.
-function worldedit.pyramid(pos, axis, height, node_name)
+function worldedit.pyramid(pos, axis, height, node_name, hollow)
local other1, other2 = worldedit.get_axis_others(axis)
-- Set up voxel manipulator
@@ -187,10 +188,12 @@ function worldedit.pyramid(pos, axis, height, node_name) local new_index2 = new_index1 + (index2 + offset[other1]) * stride[other1]
for index3 = -size, size do
local i = new_index2 + (index3 + offset[other2]) * stride[other2]
- data[i] = node_id
+ if (not hollow or size - math.abs(index2) < 2 or size - math.abs(index3) < 2) then
+ data[i] = node_id
+ count = count + 1
+ end
end
end
- count = count + (size * 2 + 1) ^ 2
size = size - 1
end
|