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

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

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.

  • Author

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

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.

  • Author

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

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.

  • Author

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

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.