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:
bartimaeusnek committed 2019-03-18 18:39:23 +01:00
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;
}
}
}