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

Here is a copy of my achievement class:

 

 

 

package com.BlackMage.BluTech.Registry;

import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;

/*
* A class that can manage and register BluTech Achievements to Minecraft
*/
public class BluTechAchievements {		
/*
 * Achievement fields - If you are going to add a block, then you need to make sure this class has a public static final 
 *                      field of the Achievement to be added.
 *                
 * Example            - If you are adding an achievement, then you need to create a static field like the following
 * 
 *                          public static final Achievement aquireBluStone = new Achievement(...);
 *                
 *                      See below for the current implementation if you are having problems.
 *                      
 * PLEASE try to keep Achievements in alphabetical order by field name!
 */
// FIXME: Achievements aren't working quite right (textures), it's probably in the constructors
public static final Achievement aquireBluStone  =  new Achievement("achievement.AquireBluStone", "AquireBluStone", 0, 0, BluTechItemMaterials.bluStoneDust, null).setIndependent();

public static final Achievement aquireCarbon    =  new Achievement("achievement.AquireCarbon",   "AquireCarbon",  -2, 0, BluTechItemMaterials.carbonChunk,  null).setIndependent();

public static final Achievement aquireLithium   =  new Achievement("achievement.AquireLithium",  "AquireLithium",  2, 0, BluTechItemMaterials.lithiumChunk, null).setIndependent();

public static final Achievement craftHammer     =  new Achievement("achievement.CraftHammer",    "CraftHammer",    1, 2, BluTechItemMaterials.bluStoneDust, null).setIndependent();


/*
 * Registering Achievements - If you are adding an achievement, then you will need to make sure that this function registers it into
 *                            the game. For ease of use, the RegisterHelper class comes in real handy for this operation.
 *                            All you have to do is add the static field of the achievement that you created, to the array
 *                            being passed into the registerAchievements method in RegisterHelper.
 *                            
 * PLEASE try to keep additions in alphabetical order by field name!
 */
public static void registerAchievements() {

	RegisterHelper.registerAchievements(
		new Achievement[] {
				aquireBluStone,
				aquireCarbon,
				aquireLithium,
				craftHammer
	});
}
}

 

 

 

For some reason since the update the achievments have been erroring and i can not figure out why

  • Author

The method setIndependent() is undefined for the type Achievement

 

So if that is no longer defined and i can not figure what replaced it

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.