Advertisement
SethBling

RandomizeUUIDs

Nov 15th, 2014
1,143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. # Feel free to modify and use this filter however you wish. If you do,
  2. # please give credit to SethBling.
  3. # http://youtube.com/SethBling
  4.  
  5. from pymclevel import TAG_Long
  6. import random
  7.  
  8. def perform(level, box, options):
  9. for (chunk, slices, point) in level.getChunkSlices(box):
  10. for e in chunk.Entities:
  11. e["UUIDMost"] = TAG_Long((random.getrandbits(47)<<16) | (1<<12) | random.getrandbits(12))
  12. e["UUIDLeast"] = TAG_Long(-((7<<60) | random.getrandbits(60)))
  13. chunk.dirty = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement