Jump to content

Recommended Posts

Posted

Hello!

 

Basically, I am trying to create a bigger explosion when my TNT goes off, but I can't seem to get it to work correctly.

I just need to make a much larger explosion. Looks like a simple thing that's right in front of me, I just can't see it.

 

 

private void explode()

    {

    float f = 50.0F;

            this.worldObj.createExplosion(this, this.posX + 50D, this.posY + 50D, this.posZ + 50D, f, true);

    }

 

 

Every day is a new day to learn.

I acknowledge the hard work of original content.

I will always improve in many ways.

 

Java > c

Posted

Has it occurred to you that you offset your explosion point from where the TNT actually sits?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

xD! Yeah, I noticed that, but the weird thing is that The explosion still occurs where the TNT exploded. Also, if the offset wasn't there and the explosion occurred exactly where the TNT exploded I still can't seem to make a bigger explosion.

 

I thought you made the explosion bigger by changing the Float value.

But as I said before, I am still very new to this.

I couldn't imagine how long it took you to get to your experience level.

Every day is a new day to learn.

I acknowledge the hard work of original content.

I will always improve in many ways.

 

Java > c

Posted

The vanilla explosion class has a lot of hard-coded behaviors, for example, the maximum limit it will search for blocks is limited to 16, though increasing the radius should certainly affect how many blocks get destroyed.

 

Try your explosion again without the offset position and see if you don't blast a giant hole in the ground. If not, you may need to write your own custom explosion code to get the behavior you need.

Posted

Ok, so I found the Explosion.Class in the net. minecraft.world package and looked at it. I remade my explosion method and it still didn't make a bigger explosion.

How exactly would you increase the radius of the explosion so that it is bigger.

 

Here is what I have so far.

 

 

private void explode()

    {

    float f = 16.0F;

        new Explosion(worldObj, this, this.posX, this.posY, this.posZ, f);

        //new Explosion(worldObj, riddenByEntity, entityRiderPitchDelta, entityRiderPitchDelta, entityRiderPitchDelta, f);

    }

 

 

I am open to any suggestions :D.

Every day is a new day to learn.

I acknowledge the hard work of original content.

I will always improve in many ways.

 

Java > c

Posted

See that f=16 part?

 

That makes the explosion bigger.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Ok. So I got some things to work...Still working on it though..... If I can't get something to work I will come back here. But, I think I solved the problem. I will tell you if I have.

Every day is a new day to learn.

I acknowledge the hard work of original content.

I will always improve in many ways.

 

Java > c

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.

×
×
  • Create New...

Important Information

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