mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
# Conflicts: # assets/hbm/lang/de_DE.lang # assets/hbm/lang/en_US.lang # assets/hbm/sounds.json # assets/hbm/sounds/music/recordLambdaCore.ogg # assets/hbm/sounds/music/recordSectorSweep.ogg # assets/hbm/sounds/music/recordVortalCombat.ogg # com/hbm/blocks/BlockCrate.java # com/hbm/blocks/ModBlocks.java # com/hbm/blocks/NukeBoy.java # com/hbm/blocks/NukeGadget.java # com/hbm/blocks/NukeMan.java # com/hbm/blocks/NukeMike.java # com/hbm/blocks/TestEventTester.java # com/hbm/entity/mob/EntityHunterChopper.java # com/hbm/explosion/ExplosionChaos.java # com/hbm/explosion/ExplosionNukeGeneric.java # com/hbm/handler/FuelHandler.java # com/hbm/items/GunFatman.java # com/hbm/items/ModItems.java # com/hbm/items/gear/ModArmor.java # com/hbm/items/special/ItemStarterKit.java # com/hbm/items/weapon/GunMP.java # com/hbm/items/weapon/GunSuicide.java # com/hbm/items/weapon/ItemGrenade.java # com/hbm/lib/HbmChestContents.java # com/hbm/lib/HbmWorldGen.java # com/hbm/lib/Library.java # com/hbm/lib/ModDamageSource.java # com/hbm/lib/RefStrings.java # com/hbm/main/ClientProxy.java # com/hbm/main/CraftingManager.java # com/hbm/main/MainRegistry.java # com/hbm/main/ModEventHandlerClient.java # com/hbm/sound/MovingSoundChopper.java # com/hbm/sound/MovingSoundChopperMine.java # com/hbm/sound/MovingSoundCrashing.java # com/hbm/sound/MovingSoundPlayerLoop.java # com/hbm/sound/MovingSoundXVL1456.java
120 lines
5.1 KiB
Java
120 lines
5.1 KiB
Java
package com.hbm.main;
|
|
|
|
<<<<<<< HEAD
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import com.hbm.entity.mob.EntityHunterChopper;
|
|
import com.hbm.entity.projectile.EntityChopperMine;
|
|
=======
|
|
<<<<<<< HEAD
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
=======
|
|
>>>>>>> 540fb3d256a0f4ae6a8b1db586f8e9cfd6ed7372
|
|
import com.hbm.entity.EntityChopperMine;
|
|
import com.hbm.entity.EntityHunterChopper;
|
|
>>>>>>> 5525318475377d238c79edc90a14ee8fa48397af
|
|
import com.hbm.lib.Library;
|
|
import com.hbm.sound.MovingSoundChopper;
|
|
import com.hbm.sound.MovingSoundChopperMine;
|
|
import com.hbm.sound.MovingSoundCrashing;
|
|
import com.hbm.sound.MovingSoundPlayerLoop;
|
|
import com.hbm.sound.MovingSoundXVL1456;
|
|
import com.hbm.sound.MovingSoundPlayerLoop.EnumHbmSound;
|
|
|
|
import codechicken.lib.render.IFaceRenderer;
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.client.audio.PositionedSound;
|
|
import net.minecraft.client.multiplayer.WorldClient;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraftforge.client.event.sound.PlaySoundEvent17;
|
|
<<<<<<< HEAD
|
|
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
|
=======
|
|
<<<<<<< HEAD
|
|
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
|
=======
|
|
>>>>>>> 540fb3d256a0f4ae6a8b1db586f8e9cfd6ed7372
|
|
>>>>>>> 5525318475377d238c79edc90a14ee8fa48397af
|
|
|
|
public class ModEventHandlerClient {
|
|
|
|
@SubscribeEvent
|
|
public void onPlaySound(PlaySoundEvent17 e) {
|
|
ResourceLocation r = e.sound.getPositionedSoundLocation();
|
|
|
|
WorldClient wc = Minecraft.getMinecraft().theWorld;
|
|
|
|
<<<<<<< HEAD
|
|
=======
|
|
<<<<<<< HEAD
|
|
>>>>>>> 5525318475377d238c79edc90a14ee8fa48397af
|
|
//Alright, alright, I give the fuck up, you've wasted my time enough with this bullshit. You win.
|
|
//A winner is you.
|
|
//Conglaturations.
|
|
//Fuck you.
|
|
|
|
<<<<<<< HEAD
|
|
=======
|
|
=======
|
|
>>>>>>> 540fb3d256a0f4ae6a8b1db586f8e9cfd6ed7372
|
|
>>>>>>> 5525318475377d238c79edc90a14ee8fa48397af
|
|
if(r.toString().equals("hbm:misc.nullTau") && Library.getClosestPlayerForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null)
|
|
{
|
|
EntityPlayer ent = Library.getClosestPlayerForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2);
|
|
|
|
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop) == null) {
|
|
MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundXVL1456(new ResourceLocation("hbm:weapon.tauChargeLoop2"), ent, EnumHbmSound.soundTauLoop));
|
|
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).setPitch(0.5F);
|
|
} else {
|
|
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).getPitch() < 1.5F)
|
|
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).setPitch(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundTauLoop).getPitch() + 0.01F);
|
|
}
|
|
}
|
|
|
|
if(r.toString().equals("hbm:misc.nullChopper") && Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null)
|
|
{
|
|
EntityHunterChopper ent = Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2);
|
|
|
|
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundChopperLoop) == null) {
|
|
MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundChopper(new ResourceLocation("hbm:entity.chopperFlyingLoop"), ent, EnumHbmSound.soundChopperLoop));
|
|
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundChopperLoop).setVolume(10.0F);
|
|
}
|
|
}
|
|
|
|
if(r.toString().equals("hbm:misc.nullCrashing") && Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null)
|
|
{
|
|
EntityHunterChopper ent = Library.getClosestChopperForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2);
|
|
|
|
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundCrashingLoop) == null) {
|
|
MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundCrashing(new ResourceLocation("hbm:entity.chopperCrashingLoop"), ent, EnumHbmSound.soundCrashingLoop));
|
|
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundCrashingLoop).setVolume(10.0F);
|
|
}
|
|
}
|
|
|
|
if(r.toString().equals("hbm:misc.nullMine") && Library.getClosestMineForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2) != null)
|
|
{
|
|
EntityChopperMine ent = Library.getClosestMineForSound(wc, e.sound.getXPosF(), e.sound.getYPosF(), e.sound.getZPosF(), 2);
|
|
|
|
if(MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundMineLoop) == null) {
|
|
MovingSoundPlayerLoop.globalSoundList.add(new MovingSoundChopperMine(new ResourceLocation("hbm:entity.chopperMineLoop"), ent, EnumHbmSound.soundMineLoop));
|
|
MovingSoundPlayerLoop.getSoundByPlayer(ent, EnumHbmSound.soundMineLoop).setVolume(10.0F);
|
|
}
|
|
}
|
|
|
|
for(MovingSoundPlayerLoop sounds : MovingSoundPlayerLoop.globalSoundList)
|
|
{
|
|
if(!sounds.init || sounds.isDonePlaying()) {
|
|
sounds.init = true;
|
|
sounds.setDone(false);
|
|
Minecraft.getMinecraft().getSoundHandler().playSound(sounds);
|
|
}
|
|
}
|
|
}
|
|
}
|