@Fus3n opened this Pull Request on April 12th 2021 First_timer

I am new to Java and modding but as i always use wurst i thought this feature can be useful for some people as it was for me
this is also my first pull so i might make some mistakes

The dist command hack lets you calculate The distance between to x z cords It uses this formula to calculate distance

it might not be a proper method to calculate Distance for a 3d game but in minecrafts cubic world it helps

the commands for it are .dist x z:x z

it can also convert Overworld cords to nether cords it devides the x and z by 8 which gives the nether cords
it can be useful when building portals to travel long distance

to convert the commands are .dist cvt:x z

As i said i am fairly new to java the codes might not be properly organized/optimized.

@CLAassistant commented on April 12th 2021

CLA assistant check
All committers have signed the CLA.

@WrightModz commented on April 15th 2021

Got this while building
C:\Users\EOL\Desktop\random coding stuff\DamienHacks\src\main\java\net\wurstclient\commands\DistCmd.java:24: error: constructor CmdError in class CmdError cannot be applied to given types;
throw new CmdError();
required: String
found: no arguments
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

Do you know a answer? @Fus3n

@Fus3n commented on April 16th 2021

if(args.length < 1)
throw new CmdError("Enter Command Properly");

this should fix it i forgot to give arguments to the CmdError Method
at DistCmd.java line 23

@Fus3n commented on April 16th 2021

i have updated the code