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

I was hoping that during the natural mob spawning events, we could have a hook that we could use to change the mob. The hook would pass along the entity to anything registered to receive it to a function that returned the mob after anything you wanted done to it was done.

I'm not sure how good that explanation was, so I am also going to try to explain it in code; basic code insert would be like this in SpawnerAnimals:

                                                            EntityLiving var38;

//existing code for reference
                                                            try
                                                            {
                                                                var38 = (EntityLiving)var21.entityClass.getConstructor(new Class[] {World.class}).newInstance(new Object[] {par0WorldServer});
                                                            }
                                                            catch (Exception var30)
                                                            {
                                                                var30.printStackTrace();
                                                                return var3;
                                                            }
//new code here
                                                            for (IEntitySpawnTransformer transformer : spawnTransformers)
                                                           {
                                                               var38=transformer.transform(var38,par0WorldServer,var17,var18,var19)
                                                          }
//continues with old code

This would help me with quite a few of the effects I am adding.

Thank you,

Sound Logic

Whats wrong with LivingSpecialSpawnEvent?

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

Well, I was hoping to transform it into another mob before the spawn check, and make it so that I could chain them properly, but I could include a chaining system seperate. I also suppose if I just kill it if a separate check doesn't work. Will LivingSpecialSpawnEvent trigger on mob spawners and such?

.... You need something a lot different. There are many places around that spawn entities. You'll need to look into and figure out where you want to really hook in.

This one is specifically for when mobs spawn naturally. And for your intentions you just need to add a new spawn type like everything else.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.