summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-09 03:20:28 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-09 03:20:28 -0400
commitba82b24aadbbff1b60daf90232dd9bb1c0ab8caa (patch)
tree4e22fa6871ffaaf24e4de4796d34183f1d8736d3
parent7acbe4fcf319bffc29812d4c5f3718c5f23886ff (diff)
downloaddreambuilder_modpack-ba82b24aadbbff1b60daf90232dd9bb1c0ab8caa.tar
dreambuilder_modpack-ba82b24aadbbff1b60daf90232dd9bb1c0ab8caa.tar.gz
dreambuilder_modpack-ba82b24aadbbff1b60daf90232dd9bb1c0ab8caa.tar.bz2
dreambuilder_modpack-ba82b24aadbbff1b60daf90232dd9bb1c0ab8caa.tar.xz
dreambuilder_modpack-ba82b24aadbbff1b60daf90232dd9bb1c0ab8caa.zip
update pipeworks again
-rw-r--r--pipeworks/luaentity.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/pipeworks/luaentity.lua b/pipeworks/luaentity.lua
index 0105c91..ab7280c 100644
--- a/pipeworks/luaentity.lua
+++ b/pipeworks/luaentity.lua
@@ -24,6 +24,22 @@ end
local function read_entities()
local t = read_file()
for _, entity in pairs(t) do
+
+ local x=entity.start_pos.x
+ local y=entity.start_pos.y
+ local z=entity.start_pos.z
+
+ x=math.max(-30912,x)
+ y=math.max(-30912,y)
+ z=math.max(-30912,z)
+ x=math.min(30927,x)
+ y=math.min(30927,y)
+ z=math.min(30927,z)
+
+ entity.start_pos.x = x
+ entity.start_pos.y = y
+ entity.start_pos.z = z
+
setmetatable(entity, luaentity.registered_entities[entity.name])
end
return t