Posted July 1, 20214 yr So, I want to listen for client pressing H and then open a custom gui. The mod is a mod that will contain custom text that will be sent in the chat, sending in chat using command "say {msg}" works, the problem here is opening a gui on key press. Can anyone help? Btw, I still don't have a custom gui, i need help on how to do that too.
July 1, 20214 yr Author Hello, I wasn't able to make what you said. Can you maybe link the docs? I really need them. Or just provide a working example of what you said.
July 1, 20214 yr Author I wasn't able to find anything about "ClientTicks". Here is my mod main file:- package com.craftit7.fpsbooster; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; @Mod("customchatembeds") public class FpsBooster { public static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "customchatembeds"; public FpsBooster() { IEventBus Bus = FMLJavaModLoadingContext.get().getModEventBus(); MinecraftForge.EVENT_BUS.register(this); } private void setup(final FMLCommonSetupEvent event) {} }
July 1, 20214 yr Author Urgh... So how am i supposed to know how to use KeyBinding? I searched the whole internet
July 1, 20214 yr Author import net.minecraft.client.settings.KeyBinding; Am i correct? Also where shall i put the keybind thingy? at setup()?
July 1, 20214 yr Author What Shall I put in the consturctor? KeyBinding keyBinding = new KeyBinding(?, ?, ?...);
July 1, 20214 yr Author Sorry if im asking alot of questions, Im new to modding. And btw My hobby IS coding, im just not used to coding in eclipse which im forced to do.
July 1, 20214 yr Author 11 minutes ago, diesieben07 said: The parameters have names...? They do have names but what does these names stand for? thats the problem. Description is ok. What shall i put in category and keyCode?! Idk what do they mean
July 1, 20214 yr 22 minutes ago, Craftit7 said: im just not used to coding in eclipse which im forced to do. you're not forced to code in eclipse. other options are IntelliJ, or VSCode (although vscode requires some setup, and therefore is not really recomended)
July 1, 20214 yr 1 hour ago, Craftit7 said: Sorry if im asking alot of questions, Im new to modding. And btw My hobby IS coding, im just not used to coding in eclipse which im forced to do. I do all my own coding without an IDE and had to set up Eclipse for this, too, and honestly I'm kind of loving it? The nice thing about being a stickler for simple DIY approaches is you get to fully appreciate modern conveniences when you're forced to try them. Being able to jump right to function declarations by right clicking on them has been a lifesaver for me so far!
July 2, 20214 yr Author Oh wait, I can use IntelliJ with forge modding?! That is gonna be amazing, im gonna try it
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.