Advertisement
justync7

spawner func

Jul 2nd, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function spawn(x,y,z,entid)
  2. -- Create a spawner
  3. w.setBlock(x, y, z, 52, 0)
  4.  
  5. -- Get an NBT table representing the tags of the spawner
  6. local te = w.getTileEntity(x, y, z)
  7. local nbt = readTileNBT(te)
  8.  
  9. -- Add the entity id
  10. table.insert(nbt.value.EntityId,{type="short",value=entid})
  11.  
  12. -- Write to world
  13. writeTileNBT(te, nbt)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement