Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private double getSpawnToAngle(World worldIn, Entity ent)
- {
- //can I use this to look for nearby Coils?
- //idea is find neraby coil, get it's object and use it's messUpCompass value in the if below
- //worldIn.getEntitiesWithinAABB(EntityPlayer.class, <AABB>)
- //first sets blockpos to world spawnpoint
- BlockPos blockpos = worldIn.getSpawnPoint();;
- //if true changes the blockpos var used to calculate compass angle to the blockpos of the BlockCoil
- if(nearby_coil_object.messUpCompass){
- blockpos = coil_object.getCoilPosition();
- }
- return Math.atan2((double)blockpos.getZ() - ent.posZ, (double)blockpos.getX() - ent.posX);
- }
Add Comment
Please, Sign In to add comment