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.

Ordinals

Members
  • Joined

  • Last visited

  1. Ordinals replied to Ordinals's topic in Modder Support
    Thanks +rep
  2. Ordinals posted a topic in Modder Support
    Hello, so my Minecraft is running but the code doesn't do something. ==Main== package com.Ordinals.Pen; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod(modid = Pen.MODID, version = Pen.VERSION) public class Pen { public static final String MODID = "Pen"; public static final String VERSION = "1.0"; bh0p bhop = new bh0p(); @EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(bhop); } } ==Other Class== package com.Ordinals.Pen; import net.minecraft.client.Minecraft; public class bh0p { public void bh0p() { if (Minecraft.getMinecraft().thePlayer != null) { for(int i = 0; i < 100; i++) { System.out.println("test"); } } } }
  3. Make it works when I press the key.
  4. Let's say I make other class with the method, how can I register it to the mod?
  5. If I did this in other class?
  6. Hello, so I new to Forge development, how can I register a method? package me.ordinals.ClientTest; import org.lwjgl.input.Keyboard; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod(modid = ClientTest.MODID, version = ClientTest.VERSION) public class ClientTest { public static final String MODID = "Client Test"; public static final String VERSION = "1.0"; @Mod.EventHandler public void Init(FMLInitializationEvent event) { } public void bhop() { if (Keyboard.isKeyDown(Keyboard.KEY_R)) { System.out.println("test"); } } }

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.