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

I've run into a few methods that have been removed/missing like onBlockActivated
From minecraft classes that extend the Block class such as...
BlockTorch
BlockBush
Just for examples.

I'm kind of new to this so I figured I would ask what I am missing
before I drop back to the block class and reinvent the wheel.
Should I wait for 1.12.2 to mature more?
Thanks
 

  • Author

Sorry, I had gotten into a brain loop and had started assuming based on experience from other work I'm doing that the code was there in 1.10. I had convinced myself that somewhere between 1.10 and 1.12 that the method was removed. If I had thought to look back at 1.10 source I would have realized my mistake. I even had the 1.10 source open in a window.

Thanks for the jolt, knocked me out of that endless loop. I've been running around in for hours.

Edited by frakier

  • Author

Also I'm still learning, think I need to go learn more about @Override. Seems more subtle than the straight forward use I have been putting it to.

  • Author

Apparently some people use it when they are not overriding anything. Or maybe I'm just misunderstanding. Like I said still learning.

In this case the author had a customTorch class that extends BlockTorch [a minecraft class] which of course extends Block [a minecraft class].

@Override was used on the onBlockActivated method in customTorch and of course as you say BlockTorch does not have the onBlockActivated method but Block does.

Most of what I have done has been fairly simple up to now and I have used @Override only when.. well overriding a method int a direct parent class.

Figured I need to go learn more on the subject.

  • Author

 

2 minutes ago, diesieben07 said:

Here is your mistake. Overriding takes place whether the method comes from a direct superclass or a superclass "further up".

I see that now.  Makes sense. Believe it or not I have programmed in other languages switching to Java has been a bit different, when I quit getting in my own way I'll have it. I've already setup forge and source for mods from off-line, made simple changes and compiled jar files. This is mostly just a weekend hobby I'm trying to learn and I learn better by example, matching examples from real world [and current forge] to tutorials on-line is interesting to say the least.
Thanks for the help.

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.