File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/main/java/anticope/rejects/commands Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ configurations {
25
25
26
26
dependencies {
27
27
// This will make it work on most platforms. It automatically chooses the right dependencies at runtime.
28
- extraLibs(' dev.duti.acheong:cubiomes:1.22.1 ' ) { transitive = false }
29
- extraLibs(' dev.duti.acheong:cubiomes:1.22.1 :linux64' ) { transitive = false }
30
- extraLibs(' dev.duti.acheong:cubiomes:1.22.1 :osx' ) { transitive = false }
31
- extraLibs(' dev.duti.acheong:cubiomes:1.22.1 :windows64' ) { transitive = false }
28
+ extraLibs(' dev.duti.acheong:cubiomes:1.22.2 ' ) { transitive = false }
29
+ extraLibs(' dev.duti.acheong:cubiomes:1.22.2 :linux64' ) { transitive = false }
30
+ extraLibs(' dev.duti.acheong:cubiomes:1.22.2 :osx' ) { transitive = false }
31
+ extraLibs(' dev.duti.acheong:cubiomes:1.22.2 :windows64' ) { transitive = false }
32
32
// To change the versions see the gradle.properties file
33
33
minecraft " com.mojang:minecraft:${ project.minecraft_version} "
34
34
mappings " net.fabricmc:yarn:${ project.yarn_version} :v2"
Original file line number Diff line number Diff line change @@ -77,12 +77,17 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
77
77
78
78
}
79
79
if (pos != null ) {
80
+ // Calculate distance
81
+ int distance = (int ) Math .hypot (pos .x - playerPos .getX (), pos .z - playerPos .getZ ());
80
82
MutableText text = Text .literal (String .format (
81
83
"%s located at " ,
82
84
Utils .nameToTitle (feature .toString ().replaceAll ("_" , "-" ))));
83
85
Vec3d coords = new Vec3d (pos .x , 0 , pos .z );
84
86
text .append (ChatUtils .formatCoords (coords ));
85
87
text .append ("." );
88
+ if (distance > 0 ) {
89
+ text .append (String .format (" (%d blocks away)" , distance ));
90
+ }
86
91
info (text );
87
92
return SINGLE_SUCCESS ;
88
93
}
You can’t perform that action at this time.
0 commit comments