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.

BuluBulu27

Members
  • Joined

  • Last visited

  1. Hello modders, I'm trying to make a mod that sends a console message when a fish has been caught and is ready to get pulled. I know I have to use some kind of EntityFishHook.onUpdate(), but I don't know how and when to use it. Also, to send the message, would I have to override the onUpdate() method and add something into it, or can I check for a certain field and add a condition concerning it? Here's the code for EntityFishHook.onUpdate() if you don't want to look for it in your IDE (it's pretty long): Thanks for any help you can provide!
  2. Hello, I recently wanted to give modding a try, so here I am trying to figure out some basics. I basically want to start by making an AutoWalk, a keybind that toggles "moving forward" for both SinglePlayer and Multiplayer, on Client Side. Will there be any difference between SP and MP for that kind of mod? How can I toggle the movement? So far, here's what I have: a rip off of multiple sources I have found online to help me with that, but I couldn't find anything updated to 1.8.9. KeyBindings.java import org.lwjgl.input.Keyboard; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.fml.client.registry.ClientRegistry; public class KeyBindings { public static KeyBinding keepForward; public static void init() { keepForward = new KeyBinding("key.keepForward", Keyboard.KEY_O, "key.categories.Autowalk"); ClientRegistry.registerKeyBinding(keepForward); } } KeyInputHandler.java import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent; public class KeyInputHandler { @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { if(KeyBindings.keepForward.isPressed()) System.out.println("FORWAAAAAARD!!!"); } } AutoWalk.java import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = AutoWalk.MODID, version = AutoWalk.VERSION) public class AutoWalk { public static final String MODID = "autowalk"; public static final String VERSION = "1.0"; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); MinecraftForge.EVENT_BUS.register(new com.bulubulu.KeyInputHandler()); com.bulubulu.KeyBindings.init(); } @Mod.EventHandler public void init(FMLInitializationEvent event) {} @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) {} } I hope some of you can shed some light on the matter. Thanks!

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.