Files
JustEnoughCalculation/src/main/java/me/towdium/jecalculation/event/handlers/FMLBusEventHandler.java
T
BmandkandCaedis da39c8e14a Add support for calculating multiple items (#14)
* Initial GUI work and basic functionality

* New implementation with linkedlist

* Use record for groupcraft

* Fix small bug with updating calculator and removing items properly

* Fix not saving on logout on client

* Restore tag workaround

* Fix format errors

* Revert using * in imports

* Spotless again

* update bs

* update deps

---------

Co-authored-by: Caedis <Caedis@users.noreply.github.com>
2024-08-06 18:59:17 -05:00

42 lines
1.2 KiB
Java

package me.towdium.jecalculation.event.handlers;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.InputEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import me.towdium.jecalculation.JustEnoughCalculation;
import me.towdium.jecalculation.data.Controller;
import me.towdium.jecalculation.data.label.labels.LPlaceholder;
import me.towdium.jecalculation.gui.JecaGui;
/**
* Author: towdium
* Date: 8/13/17.
*/
@SuppressWarnings("unused")
public class FMLBusEventHandler {
@SideOnly(Side.CLIENT)
@SubscribeEvent(receiveCanceled = true)
public void onKey(InputEvent.KeyInputEvent event) {
JecaGui.onKey();
}
@Deprecated
@SubscribeEvent
public void onLogout(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
JustEnoughCalculation.logger.info("on log out event");
Controller.writeToLocal();
LPlaceholder.onLogOut();
}
@SubscribeEvent
public void onGameTick(TickEvent.PlayerTickEvent e) {
if (e.player.worldObj.isRemote) {
JecaGui.onGameTick();
}
}
}