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

Hi there!

 

Currently i'm in the progress of porting my mods over to multiplayer, and my 'weapon' of choice was the Forge Modloader.

While working on said task, to be precise my LambChop mod, i found out that Forge does infact change the EntitySheep class, but does nothing with dropFewItems, the function that decides what item should be dropped by the sheep. The current code that i'm adding right now isn't that huge:

 

        int var3 = this.rand.nextInt(2) + 1 + this.rand.nextInt(1 + par2);
        
        for (int i = 0; i < var3; i++)
        {
            if (this.isBurning())
            {
                this.dropItem(mod_LambChop.LambChopCooked.shiftedIndex, 1);
            }
            else
            {
                this.dropItem(mod_LambChop.LambChopRaw.shiftedIndex, 1);
            }
        }

 

But it seems to me it would be a better option if forge added a hook for this, and i'd just use that to do my item dropping!

Now i'm very new to Forge, and i have no idea if i'm totally missing a hook that already exists, or no one really cares about a hook like this existing, but atleast it would give me a peace of mind that pretty much any mod using forge is going to be compatible with the mods i'm making since i no longer need to fiddle around in this baseclass!

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.