mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Refractored Code
+added Solar Factory -removed unnessecary solar and essentia generator classes +started gtnh researches +added tooltip clearance on solars (maximal output) Signed-off-by: bartimaeusnek <[email protected]>
This commit is contained in:
1 parent
980df8516a
commit
0fecf28b65
397 files changed
+8693
-9288
No files matched your search
@@ -16,40 +16,40 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class EMTClientEventHandler {
|
||||
public AudioSource audio;
|
||||
public Item lastItem;
|
||||
public AudioSource audio;
|
||||
public Item lastItem;
|
||||
|
||||
@SubscribeEvent
|
||||
public void clientTick(ClientTickEvent e) {
|
||||
if (EMTKeys.keyUnequip.getIsKeyPressed()) {
|
||||
EMT.INSTANCE.sendToServer(new PacketEMTKeys());
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void clientTick(ClientTickEvent e) {
|
||||
if (EMTKeys.keyUnequip.getIsKeyPressed()) {
|
||||
EMT.INSTANCE.sendToServer(new PacketEMTKeys());
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerTick(TickEvent.PlayerTickEvent e) {
|
||||
if (e.side == Side.CLIENT) {
|
||||
@SubscribeEvent
|
||||
public void playerTick(TickEvent.PlayerTickEvent e) {
|
||||
if (e.side == Side.CLIENT) {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Item curItem = player.inventory.getCurrentItem() == null ? null : player.inventory.getCurrentItem().getItem();
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
Item curItem = player.inventory.getCurrentItem() == null ? null : player.inventory.getCurrentItem().getItem();
|
||||
|
||||
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.updatePosition();
|
||||
audio.play();
|
||||
}
|
||||
}
|
||||
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.updatePosition();
|
||||
audio.play();
|
||||
}
|
||||
}
|
||||
|
||||
if (audio != null && curItem != lastItem) {
|
||||
audio.stop();
|
||||
audio.remove();
|
||||
audio = null;
|
||||
IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume());
|
||||
}
|
||||
if (audio != null && curItem != lastItem) {
|
||||
audio.stop();
|
||||
audio.remove();
|
||||
audio = null;
|
||||
IC2.audioManager.playOnce(player, PositionSpec.Hand, "Tools/Chainsaw/ChainsawStop.ogg", true, IC2.audioManager.getDefaultVolume());
|
||||
}
|
||||
|
||||
lastItem = curItem;
|
||||
}
|
||||
}
|
||||
lastItem = curItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user