This repository has been archived on 2024-07-25. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Thresholds/src/main/java/dev/zontreck/otemod/events/ClientEvents.java
2023-05-16 17:38:10 -07:00

33 lines
1.1 KiB
Java

package dev.zontreck.otemod.events;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.KeyBindings;
import dev.zontreck.otemod.networking.ModMessages;
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
public class ClientEvents {
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, value = Dist.CLIENT)
public static class ForgeEvents
{
@SubscribeEvent
public static void onKeyInput(InputEvent.Key event)
{
//OTEMod.LOGGER.info("KEY PRESS: "+event.getKey());
if(KeyBindings.OPEN_VAULT.matches(event.getKey(), event.getScanCode()))
{
ModMessages.sendToServer(new OpenVaultC2SPacket(0, false, 0));
}
}
}
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, value=Dist.CLIENT, bus=Mod.EventBusSubscriber.Bus.MOD)
public static class ClientModBus
{
}
}