improved fitmc

This commit is contained in:
Leijurv
2018-12-15 15:59:36 -08:00
parent fa3dab0adb
commit 863db53b24
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -96,13 +96,17 @@ public class Baritone implements IBaritone {
this.gameEventHandler = new GameEventHandler(this); 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() { public synchronized void init() {
if (initialized) { if (initialized) {
return; return;
} }
SoundEvent event = new SoundEvent(new ResourceLocation("baritone", "fitmc_intro")); fitmc();
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(event, 1.0F));
// Define this before behaviors try and get it, or else it will be null and the builds will fail! // Define this before behaviors try and get it, or else it will be null and the builds will fail!
this.playerContext = PrimaryPlayerContext.INSTANCE; this.playerContext = PrimaryPlayerContext.INSTANCE;
@@ -201,6 +201,7 @@ public class ExampleBaritoneControl extends Behavior implements Helper {
} else if (pathingBehavior.isPathing()) { } else if (pathingBehavior.isPathing()) {
logDirect("Currently executing a path. Please cancel it first."); logDirect("Currently executing a path. Please cancel it first.");
} else { } else {
baritone.fitmc();
customGoalProcess.setGoalAndPath(pathingBehavior.getGoal()); customGoalProcess.setGoalAndPath(pathingBehavior.getGoal());
} }
return true; return true;