Skip to content

Instantly share code, notes, and snippets.

@GreenXenith
Last active October 14, 2018 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GreenXenith/8d5e1793ccccf4e57b231b09c2772953 to your computer and use it in GitHub Desktop.
Save GreenXenith/8d5e1793ccccf4e57b231b09c2772953 to your computer and use it in GitHub Desktop.
entity def
-- Assume `orig` exists and is a valid pos
local parent = minetest.add_entity(orig, "mymod:myentity")
if not parent.children then
parent.children = {}
end
-- These data values mean nothing in this context, assume they exist and are correct
local data = {
offset = off,
attoff = attoff,
param2 = node.param2,
def = def,
}
parent.children[#parent.children+1] = data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment