add a little version thingy

This commit is contained in:
Leijurv 2019-02-05 21:49:09 -08:00
parent efb316de14
commit 52cafbc7aa
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 13 additions and 1 deletions

View File

@ -116,7 +116,10 @@ jar {
jar { jar {
manifest { manifest {
attributes( attributes(
'MixinConfigs': 'mixins.baritone.json' 'MixinConfigs': 'mixins.baritone.json',
'Implementation-Title': 'Baritone',
'Implementation-Version': version
) )
} }
} }

View File

@ -227,6 +227,15 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
} }
return true; return true;
} }
if (msg.equals("version")) {
String version = ExampleBaritoneControl.class.getPackage().getImplementationVersion();
if (version == null) {
logDirect("No version detected. Either dev environment or broken install.");
} else {
logDirect("You are using Baritone v" + version);
}
return true;
}
if (msg.equals("repack") || msg.equals("rescan")) { if (msg.equals("repack") || msg.equals("rescan")) {
ChunkProviderClient cli = (ChunkProviderClient) ctx.world().getChunkProvider(); ChunkProviderClient cli = (ChunkProviderClient) ctx.world().getChunkProvider();
int playerChunkX = ctx.playerFeet().getX() >> 4; int playerChunkX = ctx.playerFeet().getX() >> 4;