Advertisement
TrashboxBobylev

Filter Code

Sep 29th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (Level.getTime()%10==0)
  2. {
  3.     CobaltFilter.forEach(function(filter){
  4.         mob = Entity.getAll()
  5.         for (var i=0;i<mob.length;i++)
  6.         {
  7.         xx = Entity.getX(mob[i])-filter.x
  8.         yy = Entity.getY(mob[i])-filter.y
  9.         zz = Entity.getZ(mob[i])-filter.z
  10.         if (Entity.getType(mob[i]==EntityType.ITEM))
  11.         if (xx*xx+yy*yy+zz*zz<1.01*1.01)
  12.         {
  13.             item = {id: Entity.getEntityItemId(mob[i]),count: Entity.getEntityItemCount(mob[i]), damage:Entity.getEntityItemData(mob[i])}
  14.             if (var hz + 1;hz<26;hz++)
  15.             {
  16.                 CobaltBots.forEach(function(bots){
  17.                     if (bots.prototypex==filter.x&&bots.prototypey==filter.y&&bots.prototypez==filter.z)
  18.                     {
  19.                         if (bots.hz==hz)
  20.                     }
  21.                 })
  22.             }
  23.         }
  24.         }
  25.     }) 
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement