mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-10-25 20:22:26 +00:00
Merge remote-tracking branch 'origin/1.7.10' into gtnh
This commit is contained in:
2 files changed
+9
-17
No files matched your search
+1
-1
@@ -166,7 +166,7 @@ curseForgeProjectId =
|
||||
# and the name is the CurseForge project slug of the other mod.
|
||||
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
curseForgeRelations =
|
||||
curseForgeRelations = 1238321
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
|
||||
@@ -1,36 +1,28 @@
|
||||
package baubles.common.event;
|
||||
|
||||
import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import baubles.common.network.PacketHandler;
|
||||
import baubles.common.network.PacketOpenBaublesInventory;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class KeyHandler {
|
||||
|
||||
public KeyBinding key = new KeyBinding(StatCollector.translateToLocal("keybind.baublesinventory"),
|
||||
Keyboard.KEY_B, "key.categories.inventory");
|
||||
|
||||
|
||||
public KeyBinding key = new KeyBinding(StatCollector.translateToLocal("keybind.baublesinventory"),
|
||||
Keyboard.KEY_NONE, "key.categories.inventory");
|
||||
|
||||
public KeyHandler() {
|
||||
ClientRegistry.registerKeyBinding(key);
|
||||
}
|
||||
|
||||
@SideOnly(value=Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void playerTick(PlayerTickEvent event) {
|
||||
if (event.side == Side.SERVER) return;
|
||||
if (event.phase == Phase.START ) {
|
||||
if (key.getIsKeyPressed() && FMLClientHandler.instance().getClient().inGameHasFocus) {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketOpenBaublesInventory(event.player));
|
||||
}
|
||||
public void onKeyEvent(InputEvent.KeyInputEvent event) {
|
||||
if (key.getIsKeyPressed()) {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketOpenBaublesInventory());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user