Jump to content

[1.7.10] EntityLargeFireball Explosion Question


grand_mind1

Recommended Posts

Hey guys, quick question. EntityLargeFireball creates an explosion on impact like normal with worldObj.newExplosion(), however it sets the entity for the cause of the explosion to null, rather than EntityLargeFireball for some reason. I was just wondering if there is any way around this, because I would like to be able to get the cause of explosions.

Thanks!

Link to comment
Share on other sites

Hey guys, quick question. EntityLargeFireball creates an explosion on impact like normal with worldObj.newExplosion(), however it sets the entity for the cause of the explosion to null, rather than EntityLargeFireball for some reason. I was just wondering if there is any way around this, because I would like to be able to get the cause of explosions.

Thanks!

 

Explosion is explosion, not fireball. If you really need it to track as the fireball then write it in yourself.

Link to comment
Share on other sites

Sorry, I worded it kind of strangely. Let me try to correct myself and clarify. I'm talking about the fireball that is fired by the ghast. As far as I can tell, the game separates the blaze/fire charge and ghast fireball into EntitySmallFireball and EntityLargeFireball, respectively. I'm trying to detect the explosion made by the large fireball in the ExplosionEvent. However, this it is not possible to distinguish, in the ExplosionEvent, if the explosion was caused by an EntityLargeFireball. This is because when the fireball creates the explosion, it sets the cause of the newly created explosion to null.

Link to comment
Share on other sites

This is where it is being done in the EntityLargeFireball class:

this.worldObj.newExplosion((Entity)null, this.posX, this.posY, this.posZ, (float)this.field_92057_e, true, this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"));

As you can see, the entity(first param of newExplosion()) is being set to null.

Link to comment
Share on other sites

Sorry, I worded it kind of strangely. Let me try to correct myself and clarify. I'm talking about the fireball that is fired by the ghast. As far as I can tell, the game separates the blaze/fire charge and ghast fireball into EntitySmallFireball and EntityLargeFireball, respectively. I'm trying to detect the explosion made by the large fireball in the ExplosionEvent. However, this it is not possible to distinguish, in the ExplosionEvent, if the explosion was caused by an EntityLargeFireball. This is because when the fireball creates the explosion, it sets the cause of the newly created explosion to null.

 

 

Explosion is explosion, not fireball. If you really need it to track as the fireball then write it in yourself.

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.
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...

×   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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.