Search in sources :

Example 1 with SoundInstance

use of net.minecraft.client.sound.SoundInstance in project meteor-client by MeteorDevelopment.

the class AutoFish method onPlaySound.

@EventHandler
private void onPlaySound(PlaySoundEvent event) {
    SoundInstance p = event.sound;
    FishingBobberEntity b = mc.player.fishHook;
    if (p.getId().getPath().equals("entity.fishing_bobber.splash")) {
        if (!splashDetectionRangeEnabled.get() || Utils.distance(b.getX(), b.getY(), b.getZ(), p.getX(), p.getY(), p.getZ()) <= splashDetectionRange.get()) {
            ticksEnabled = true;
            ticksToRightClick = ticksCatch.get();
            ticksData = 0;
        }
    }
}
Also used : FishingBobberEntity(net.minecraft.entity.projectile.FishingBobberEntity) SoundInstance(net.minecraft.client.sound.SoundInstance) EventHandler(meteordevelopment.orbit.EventHandler)

Example 2 with SoundInstance

use of net.minecraft.client.sound.SoundInstance in project Client by MatHax.

the class AutoFish method onPlaySound.

@EventHandler
private void onPlaySound(PlaySoundEvent event) {
    SoundInstance p = event.sound;
    FishingBobberEntity b = mc.player.fishHook;
    if (p.getId().getPath().equals("entity.fishing_bobber.splash")) {
        if (!splashDetectionRangeEnabled.get() || Utils.distance(b.getX(), b.getY(), b.getZ(), p.getX(), p.getY(), p.getZ()) <= splashDetectionRange.get()) {
            ticksEnabled = true;
            ticksToRightClick = ticksCatch.get();
            ticksData = 0;
        }
    }
}
Also used : FishingBobberEntity(net.minecraft.entity.projectile.FishingBobberEntity) SoundInstance(net.minecraft.client.sound.SoundInstance) EventHandler(mathax.client.eventbus.EventHandler)

Aggregations

SoundInstance (net.minecraft.client.sound.SoundInstance)2 FishingBobberEntity (net.minecraft.entity.projectile.FishingBobberEntity)2 EventHandler (mathax.client.eventbus.EventHandler)1 EventHandler (meteordevelopment.orbit.EventHandler)1