Integrate Wild Update quests and Citizens contacts

This commit is contained in:
unimatrixgit 2026-12-03 21:42:17 +01:00
commit f46b26d956

View file

@ -0,0 +1,9 @@
package com.dunerealms.gui;
/** Turns an offset into words a player can follow. North is -Z, east is +X. */
final class Bearing {
private static final String[] POINTS={"north","north-east","east","south-east","south","south-west","west","north-west"};
private Bearing(){}
static String direction(double dx,double dz){double degrees=Math.toDegrees(Math.atan2(dx,-dz));if(degrees<0)degrees+=360;return POINTS[(int)Math.round(degrees/45.0)%8];}
static String describe(double dx,double dz){int blocks=(int)Math.round(Math.hypot(dx,dz));return blocks<6?"right beside you":blocks+" blocks "+direction(dx,dz);}
}