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

How do you make an achievement in 1.7.2? Please post the code because i have been searching for this for several weeks now and i just cant figure out how.

Learn Java and look around at the code. It's so easy, I'm not going to post any code. Just look around at how Minecraft handles achievements.

 

As for the page:


public static AchievementPage page;

@EventHandler
public void preInit(FMLPreInitializationEvent event) {

page = new AchievementPage("Achievement Page",new Achievement[]{/* All the achievements */});

AchievementPage.registerAchievementPage(page);

}

 

Hope this helped!

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
  • Author

Yeh i forgot to tell you that i found the achievement i just needed the page so thanks ;)

 

Learn Java and look around at the code. It's so easy, I'm not going to post any code. Just look around at how Minecraft handles achievements.

 

As for the page:


public static AchievementPage page;

@EventHandler
public void preInit(FMLPreInitializationEvent event) {

page = new AchievementPage("Achievement Page",new Achievement[]{/* All the achievements */});

AchievementPage.registerAchievementPage(page);

}

 

Hope this helped!

 

And is there a way how to do it with an external class were all Achievements are inside, like the Twilight Forest mod in 1.6 did it? And if so, how?

Developer of Primeval Forest.

You mean make a new class where you have the achievements stored? That's super simple. Register everything in a method there and call that method in your preInit.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

You mean make a new class where you have the achievements stored? That's super simple. Register everything in a method there and call that method in your preInit.

Yeah, its easy, but I asked because I thought I've done something wrong because my Achievements were rendered then in the normal page and my page crashs. But I've fixed it, but I've know idea, how I've fixed it...

Developer of Primeval Forest.

At the very end of the AchievementPage, there's a parameter that is Achievement[]. You put in an array of achievements that needed to go on that page. That's how you fixed it.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

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.