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.

Lqgback

Members
  • Joined

  • Last visited

  1. Thanks! After building via gradlew it all works!
  2. Hello! After creating a keybinding class, I began testing through the IDE. All functions work perfect when I run the main class in Eclipse and play the temporary forge version of the game, but when I export and run the mod normally, the game crashes whenever a key is pressed. Here is the error message: The game crashed whilst unexpected errorError: java.lang.NoSuchMethodError: net.minecraft.client.settings.KeyBinding.isPressed()Z Here is my keyinputhandler class: import net.minecraft.client.Minecraft; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent; public class KeyInputHandler { public Events eventsClass; public KeyInputHandler(Events eClass) { eventsClass = eClass; } @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent e) { if (KeyBinds.toggleMsgs.isPressed()) { eventsClass.showMsgs = !eventsClass.showMsgs; if (eventsClass.showMsgs) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Messages toggled: " + EnumChatFormatting.GOLD + "ON" + EnumChatFormatting.GREEN + "!")); } else { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Messages toggled: " + EnumChatFormatting.GOLD + "OFF" + EnumChatFormatting.GREEN + "!")); } } else if (KeyBinds.toggleGuild.isPressed()) { eventsClass.showGuild = !eventsClass.showGuild; if (eventsClass.showGuild) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Guild chat toggled: " + EnumChatFormatting.GOLD + "ON" + EnumChatFormatting.GREEN + "!")); } else { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Guild chat toggled: " + EnumChatFormatting.GOLD + "OFF" + EnumChatFormatting.GREEN + "!")); } } else if (KeyBinds.toggleParty.isPressed()) { eventsClass.showParty = !eventsClass.showParty; if (eventsClass.showParty) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Party chat toggled: " + EnumChatFormatting.GOLD + "ON" + EnumChatFormatting.GREEN + "!")); } else { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Party chat toggled: " + EnumChatFormatting.GOLD + "OFF" + EnumChatFormatting.GREEN + "!")); } } else if (KeyBinds.toggleAutoGG.isPressed()) { eventsClass.autoGG = !eventsClass.autoGG; if (eventsClass.autoGG) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Auto GG toggled: " + EnumChatFormatting.GOLD + "ON" + EnumChatFormatting.GREEN + "!")); } else { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation(EnumChatFormatting.GREEN + "Auto GG toggled: " + EnumChatFormatting.GOLD + "OFF" + EnumChatFormatting.GREEN + "!")); } } } } Any insight would be helpful!
  3. After registering the event in a separate class all is working. Thanks for the help!
  4. Hello! As a start to a mod that I hope will remove specific chat events, I decided to attempt to remove all server chat by cancelling every "ClientChatReceivedEvent" event. Here is that source: @SubscribeEvent public void ClientChatReceivedEvent(ClientChatReceivedEvent e) { e.setCanceled(true); } However, when I run the mod, there is no visible effect. Anyone know why this might happen?

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.