improved fitmc

This commit is contained in:
Leijurv 2018-12-15 15:59:36 -08:00
parent fa3dab0adb
commit 863db53b24
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 7 additions and 2 deletions

View File

@ -96,13 +96,17 @@ public class Baritone implements IBaritone {
this.gameEventHandler = new GameEventHandler(this);
}
public void fitmc() {
SoundEvent event = new SoundEvent(new ResourceLocation("baritone", "fitmc_intro"));
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(event, 0.8F + (float) Math.random() * 0.4F));
}
public synchronized void init() {
if (initialized) {
return;
}
SoundEvent event = new SoundEvent(new ResourceLocation("baritone", "fitmc_intro"));
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(event, 1.0F));
fitmc();
// Define this before behaviors try and get it, or else it will be null and the builds will fail!
this.playerContext = PrimaryPlayerContext.INSTANCE;

View File

@ -201,6 +201,7 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
} else if (pathingBehavior.isPathing()) {
logDirect("Currently executing a path. Please cancel it first.");
} else {
baritone.fitmc();
customGoalProcess.setGoalAndPath(pathingBehavior.getGoal());
}
return true;