Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Vanilla Mob Drops.


Goz3rr
 Share

Recommended Posts

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.