mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
c312069d28
commit
6bdb2c0b96
100 files changed
+3171
-3401
No files matched your search
@@ -1,5 +1,9 @@
|
||||
package emt.util;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
|
||||
@@ -11,11 +15,9 @@ import emt.network.PacketEMTKeys;
|
||||
import ic2.core.IC2;
|
||||
import ic2.core.audio.AudioSource;
|
||||
import ic2.core.audio.PositionSpec;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class EMTClientEventHandler {
|
||||
|
||||
public AudioSource audio;
|
||||
public Item lastItem;
|
||||
|
||||
@@ -31,21 +33,18 @@ public class EMTClientEventHandler {
|
||||
if (e.side == Side.CLIENT) {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Item curItem = player.inventory.getCurrentItem() == null
|
||||
? null
|
||||
Item curItem = player.inventory.getCurrentItem() == null ? null
|
||||
: player.inventory.getCurrentItem().getItem();
|
||||
|
||||
if (curItem == EMTItems.diamondChainsaw
|
||||
|| curItem == EMTItems.streamChainsaw
|
||||
if (curItem == EMTItems.diamondChainsaw || curItem == EMTItems.streamChainsaw
|
||||
|| curItem == EMTItems.thaumiumChainsaw) {
|
||||
if (audio == null)
|
||||
audio = IC2.audioManager.createSource(
|
||||
player,
|
||||
PositionSpec.Hand,
|
||||
"Tools/Chainsaw/ChainsawIdle.ogg",
|
||||
true,
|
||||
false,
|
||||
IC2.audioManager.getDefaultVolume());
|
||||
if (audio == null) audio = IC2.audioManager.createSource(
|
||||
player,
|
||||
PositionSpec.Hand,
|
||||
"Tools/Chainsaw/ChainsawIdle.ogg",
|
||||
true,
|
||||
false,
|
||||
IC2.audioManager.getDefaultVolume());
|
||||
if (audio != null) {
|
||||
audio.updatePosition();
|
||||
audio.play();
|
||||
|
||||
Reference in new issue
Block a user