Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function spawn(x,y,z,entid)
- -- Create a spawner
- w.setBlock(x, y, z, 52, 0)
- -- Get an NBT table representing the tags of the spawner
- local te = w.getTileEntity(x, y, z)
- local nbt = readTileNBT(te)
- -- Add the entity id
- table.insert(nbt.value.EntityId,{type="short",value=entid})
- -- Write to world
- writeTileNBT(te, nbt)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement