5050
5151public class Freecam extends Module {
5252 private final SettingGroup sgGeneral = settings .getDefaultGroup ();
53+ private final SettingGroup sgPathing = settings .createGroup ("Pathing" );
5354
5455 private final Setting <Double > speed = sgGeneral .add (new DoubleSetting .Builder ()
5556 .name ("speed" )
@@ -125,11 +126,9 @@ public class Freecam extends Module {
125126 .build ()
126127 );
127128
128- private final SettingGroup sgPathing = settings .createGroup ("Pathing" );
129-
130129 private final Setting <Boolean > baritoneClick = sgPathing .add (new BoolSetting .Builder ()
131- .name ("click-sets-goal " )
132- .description ("Sets a goal to any block you click." )
130+ .name ("click-to-path " )
131+ .description ("Sets a pathfinding goal to any block/entity you click at ." )
133132 .defaultValue (false )
134133 .build ()
135134 );
@@ -324,9 +323,7 @@ private BlockPos rayCastEntity(Vec3d posVec, Vec3d max, short maxDist) {
324323 maxDist
325324 );
326325
327- if (res == null ) {
328- return null ;
329- }
326+ if (res == null ) return null ;
330327
331328 Vec3d vec = res .getPos ();
332329
@@ -344,9 +341,7 @@ private BlockPos rayCastBlock(Vec3d posVec, Vec3d max) {
344341 );
345342
346343 BlockHitResult res = mc .world .raycast (ctx );
347- if (res .getType () == HitResult .Type .MISS ) {
348- return null ;
349- }
344+ if (res .getType () == HitResult .Type .MISS ) return null ;
350345
351346 // Don't move inside block
352347 return res .getBlockPos ().add (res .getSide ().getVector ());
@@ -356,9 +351,7 @@ private void setGoal() {
356351 long prevClick = clickTs ;
357352 clickTs = System .currentTimeMillis ();
358353
359- if (requireDoubleClick .get () && clickTs - prevClick > 500 ) {
360- return ;
361- }
354+ if (requireDoubleClick .get () && clickTs - prevClick > 500 ) return ;
362355
363356 Camera cam = mc .gameRenderer .getCamera ();
364357 Vec3d posVec = cam .getPos ();
@@ -371,9 +364,7 @@ private void setGoal() {
371364 pos = rayCastBlock (posVec , max );
372365 }
373366
374- if (pos == null ) {
375- return ;
376- }
367+ if (pos == null ) return ;
377368
378369 PathManagers .get ().moveTo (pos );
379370 }
0 commit comments