daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from mcpi.minecraft import Minecraft
  2. from time import sleep
  3.  
  4. mc = Minecraft.create()
  5. entityIDs = mc.getPlayerEntityIds()
  6. playerList = []
  7.  
  8.  
  9. playerList.clear()
  10. entityIDs = mc.getPlayerEntityIds()
  11. for entity in entityIDs:
  12.         enX,enY,enZ = mc.entity.getPos(entity)
  13.         playerList.append({
  14.                 'ID'    :  entity,
  15.                 'X' :  enX,
  16.                 'Y' :  enY,
  17.                 'Z' :  enZ
  18.         })
  19.         print('Teleporting to '+ str(enX)+', '+str(enY)+', '+str(enZ) )
  20.  
  21. for entity in playerList:
  22.     mc.player.setPos(entity['ID'],0,15,0)
  23.     pos_string = str([int(entity['X']), int(entity['Y']), int(entity['Z'])])
  24.     mc.postToChat('ID: '+ str(entity['ID'])+ '- [pos: '+ pos_string)
  25.  
  26.  
  27. sleep(1.0)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top