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.

daniel0916

Members
  • Joined

  • Last visited

Everything posted by daniel0916

  1. Thanks. Perfectly working . So only one last question: How can i execute a command with forge? I understand how to send chat messages but i don't find something for commands.
  2. Okay, but the event doesn't get called. @SubscribeEvent public void onItemUse(PlayerUseItemEvent event) { System.out.println(event.item.getItem()); System.out.println(Item.getIdFromItem(event.item.getItem())); } MinecraftForge.EVENT_BUS.register(new Events()); "This event is separated in sub-phase events, make sure you picked right one." What do you mean with this exactly? Edit: Ah, okay. I understand it now. Edit2: Okay, the event is working when i block with the sword but i need a event which get called when i make right-click with a compass.
  3. When i have a item in my hand and right click the event should be called. So mouse click.
  4. public int getRequiredPermissionLevel() { return 0; } Fixed my problem. And can i use a event for right clicking with an item? client-side?
  5. Do I need to overwrite canCommandSenderUse?
  6. Big thanks. That's working. Now, i only have a permission problem. Maybe i can find the solution with searching .
  7. Yes, but then the mod needs to be installed on the server or? But i want to have this command only client-side. I only had modified minecraft directly with mcp before...
  8. Okay, it works. But it's the wrong event. Which event can i use for getting the command who is a player executing on a server. When i connect to a server and make "/test" the event should be called.
  9. Hello guys, i'm a beginner in Forge Development and i have a problem with using events. Code: @Mod(modid = Test.MODID, version = Test.VERSION) public class Test { public static final String MODID = "Test"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new CommandListener()); //FMLCommonHandler.instance().bus().register(new ExecuteEvent()); } } public class CommandListener { public void onCommand(CommandEvent event) { System.out.println(event.command); } } I don't get the message. What's wrong? Thanks for reading my question. Greetings Daniel

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.