Advertisement
Guest User

Untitled

a guest
Apr 18th, 2022
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1.         List <CampaignTerrainAPI> terrainList=system.getTerrainCopy();
  2.         for (CampaignTerrainAPI terrain:terrainList)
  3.         {
  4.             log.info("Looking for nascent gravity wells to purge.");
  5.             //note: isInCurrentLocation doesn't work because the well is in hyper, not realspace
  6.             if(terrain.getLocationInHyperspace() == planet.getLocationInHyperspace()&&terrain instanceof NascentGravityWellAPI);
  7.             {
  8.                 log.info("Purging nascent gravity well.");
  9.  
  10.                 //note: what if we just teleport this somewhere else and hope it don't matter
  11.  
  12.                 terrain.setLocation(-10000,-10000);
  13.  
  14.                 //note: shrinking things small doesn't seem to work either
  15.                 final float tinyRadius =0.1f;
  16.                 terrain.setRadius(tinyRadius);
  17.  
  18.                 LocationAPI location = terrain.getContainingLocation();
  19.                 log.info("nascent grav well's location is" + location.getLocation());
  20.                 //note: this doesn't work for whatever reason
  21.                 location.removeEntity(terrain);
  22.                 break;
  23.             }
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement