mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-10-26 14:24:13 +00:00
* 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>
42 lines
1.2 KiB
Java
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();
|
|
}
|
|
}
|
|
}
|