Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • 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.

 

  • 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) {}
}

 

  • Author

import net.minecraft.client.settings.KeyBinding;
Am i correct?


Also where shall i put the keybind thingy? at setup()?

  • 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.

  • 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

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)

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. xD Being able to jump right to function declarations by right clicking on them has been a lifesaver for me so far!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.