Posted September 30, 201213 yr 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
October 1, 201213 yr 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
October 1, 201213 yr 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?
October 1, 201213 yr .... 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.