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.

Featured Replies

Posted

Hello there!

 

I've got few questions about implementing my own Forge events for making public API for my mods.

 

How do you control cancel-able events? Do you simply post an event and check if post(Event event) method of EventBus returns true, then it was canceled?

 

if (MinecraftForge.EVENT_BUS.post(event))
{
    return false;
}

/* Event wasn't canceled */

 

Do I understand it right?

 

Second question is should I use MinecraftForge.EVENT_BUS or create a new event bus for my own mod and post it there? I don't know about penalties of posting my events on EVENT_BUS, however I do know that his bus is responsible for a lot of things like tick events and many much more. Just to clarify, my events aren't something that fire frequently, but depending on how frequent users will be using the features, it might turn out to be quite frequent.

 

Thanks for attention!  :)

Blockbuster – simple machinimas and cinematics for Minecraft

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.