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

Because 1.7.10 isn't supported by forge anymore, I'm trying to make my block in 1.8 .

So, what ever the big difference is, I still havent found a way to do this right.

I just want to make a block that explodes instantly when you place it.

Help would be very appreciated because this is my first mod and I just know the basics about forge.

 

 

thanks!

  • Author

I just completely lost...

 

After trying for hours I've found no way to bring that to work.

This is what I've got, and I know this doesn't work because my game crashes any time when i place the block :)

        @Override
        public int onBlockPlaced(World world, final int x, final int y, final int z, final int p_149660_5_, final float hitX, final float hitY, final float hitZ, final int metadata) {
            return  world.createExplosion(null, 9D, 9D, 9D, 9F);
        }
}

    


I just don't know what I have to fill in into this auto comleteted thing that comes up...

 

Thanks...

 

By the way: If you find mystakes like grammarmystakes or spellingmystakes... I'm german, my english is not the best!

 

 

  • Author

I searched the internet for onBlockPlaced.

I found an forum post about it and I thought there is no difference to between 1.7 and 1.8.

So I did it like the guy who posted this :

Would it work in 1.7.10? And how...

And I would prefer to use 1.7.10 because I'm trying to make a mod for an modpack that is still in 1.7.10.

Because 1.7.10 is not supported anymore I have to recreate the modpack in 1.8...

 

 

8 hours ago, AforgeUser said:

return  world.createExplosion(null, 9D, 9D, 9D, 9F);

25810.jpg

World#createExplosion returns an Explosion object. You can't use that as the return value for a method that returns an integer.

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.

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.