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.

kekmane

Members
  • Joined

  • Last visited

Everything posted by kekmane

  1. i got i somewhat working, i accidentally made a problem with my syntax thanks tho edit:nvm lol
  2. tried that already. i would have pasted that version but i just posted the current one that i had also didnt work
  3. well many gotta start somewhere and i was forcefed javascript but i made an effort to pay attention to what my friends were doing and i got it down eventually and now im better than they are but yknow i think most people who want to make mods will be passionate about it and pay attention
  4. yeah i did it the right way but its giving me an error on the event bus but its saying that i should create a variable of my handler, i guess it doesnt thing that myforgeeventhandler is real, package wmwwmnn.mod; import java.awt.List; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ServerChatEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import wmwwmnn.mod.proxy.CommonProxy; import wmwwmnn.mod.util.ref; import net.minecraftforge.client.event.ClientChatEvent; @Mod(modid = ref.MOD_ID, name = ref.NAME, version = ref.VERSION) public class Main {s @Instance public static Main Instance; @SidedProxy(clientSide = ref.CLIENT_PROXY_CLASS, serverSide = ref.COMMON_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public static void PreInit(FMLPreInitializationEvent event) { } @EventHandler public static void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(MyForgeEventHandler())); } @EventHandler public static void Postinit(FMLPostInitializationEvent event) { } public class MyForgeEventHandler { @SubscribeEvent public void onChat(ClientChatEvent event) { System.out.println("msg"); String msg = event.getMessage(); System.out.println("ClientChatEvent: " + msg); if (msg.contains("Hello")) { Minecraft.getMinecraft().player.sendChatMessage("Hi Yourself!"); } else if (msg.contains("Bye")) { Minecraft.getMinecraft().player.sendChatMessage("Later!"); } } } }
  5. package wmwwmnn.mod; import java.awt.List; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ServerChatEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import wmwwmnn.mod.proxy.CommonProxy; import wmwwmnn.mod.util.ref; import net.minecraftforge.client.event.ClientChatEvent; @Mod(modid = ref.MOD_ID, name = ref.NAME, version = ref.VERSION) public class Main { @Instance public static Main Instance; @SidedProxy(clientSide = ref.CLIENT_PROXY_CLASS, serverSide = ref.COMMON_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public static void PreInit(FMLPreInitializationEvent event) { } @EventHandler public static void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new ClientChatEvent(null)); } @EventHandler public static void Postinit(FMLPostInitializationEvent event) { } @Mod.EventBusSubscriber public class MyForgeEventHandler { @SubscribeEvent public void onChat(ClientChatEvent event) { System.out.println("msg"); String msg = event.getMessage(); System.out.println("ClientChatEvent: " + msg); if (msg.contains("Hello")) { Minecraft.getMinecraft().player.sendChatMessage("Hi Yourself!"); } else if (msg.contains("Bye")) { Minecraft.getMinecraft().player.sendChatMessage("Later!"); } } } } im a noob btw im trying to port a bot from a javascript api to a mod instead of nodejs,

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.