Jump to content

Recommended Posts

Posted

My achievements aren't getting triggered for some reason. Code:

 

AchievementEvent.class:

package dudesmods.extraachievements.extraachievements2;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;

public class AchievementEvent {

@SubscribeEvent
public void onPickup(PlayerEvent.ItemPickupEvent e) {
	if(e.pickedUp.getEntityItem() == new ItemStack(Items.clay_ball)) {
		e.player.addStat(ExtraAchievements.aquireClay, 1);
	}
	if(e.pickedUp.getEntityItem() == new ItemStack(Items.skull, 1)) {
		e.player.addStat(ExtraAchievements.witherSkulls, 1);
	}
	if(e.pickedUp.getEntityItem() == new ItemStack(Blocks.soul_sand)) {
		e.player.addStat(ExtraAchievements.soulSand, 1);
	}
	if(e.pickedUp.getEntityItem() == new ItemStack(Blocks.netherrack)) {
		e.player.addStat(ExtraAchievements.aquireNetherrack, 1);
	}
	if(e.pickedUp.getEntityItem() == new ItemStack(Blocks.sand)) {
		e.player.addStat(ExtraAchievements.aquireSand, 1);
	}
}

@SubscribeEvent
public void onCrafting(PlayerEvent.ItemCraftedEvent e) {
	/**Tools**/
	/*Hoes*/
	if (e.crafting.getItem() == Items.stone_hoe)
        {
                e.player.addStat(ExtraAchievements.buildHoeStone, 1);
        }
	if (e.crafting.getItem() == Items.iron_hoe)
	{
		e.player.addStat(ExtraAchievements.buildHoeIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_hoe)
	{
		e.player.addStat(ExtraAchievements.buildHoeGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_hoe)
	{
		e.player.addStat(ExtraAchievements.buildHoeDiamond, 1);
	}
	/*Pickaxe*/
	if (e.crafting.getItem() == Items.iron_pickaxe)
	{
		e.player.addStat(ExtraAchievements.buildPickaxeIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_pickaxe)
	{
		e.player.addStat(ExtraAchievements.buildPickaxeGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_pickaxe)
	{
		e.player.addStat(ExtraAchievements.buildPickaxeDiamond, 1);
	}
	/*Swords*/
	if (e.crafting.getItem() == Items.stone_sword)
        {
                e.player.addStat(ExtraAchievements.buildSwordStone, 1);
        }
	if (e.crafting.getItem() == Items.iron_sword)
	{
		e.player.addStat(ExtraAchievements.buildSwordIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_sword)
	{
		e.player.addStat(ExtraAchievements.buildSwordGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_sword)
	{
		e.player.addStat(ExtraAchievements.buildSwordDiamond, 1);
	}
	/*Axes*/
	if (e.crafting.getItem() == Items.wooden_axe) {
		e.player.addStat(ExtraAchievements.buildAxeWood, 1);
	}
	if (e.crafting.getItem() == Items.stone_axe)
        {
                e.player.addStat(ExtraAchievements.buildAxeStone, 1);
        }
	if (e.crafting.getItem() == Items.iron_axe)
	{
		e.player.addStat(ExtraAchievements.buildAxeIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_axe)
	{
		e.player.addStat(ExtraAchievements.buildAxeGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_axe)
	{
		e.player.addStat(ExtraAchievements.buildAxeDiamond, 1);
	}
	/*Shovels*/
	if (e.crafting.getItem() == Items.wooden_shovel) {
		e.player.addStat(ExtraAchievements.buildShovelWood, 1);
	}
	if (e.crafting.getItem() == Items.stone_shovel)
        {
                e.player.addStat(ExtraAchievements.buildShovelStone, 1);
        }
	if (e.crafting.getItem() == Items.iron_shovel)
	{
		e.player.addStat(ExtraAchievements.buildShovelIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_shovel)
	{
		e.player.addStat(ExtraAchievements.buildShovelGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_shovel)
	{
		e.player.addStat(ExtraAchievements.buildShovelDiamond, 1);
	}
	/**Armor**/
	/*Helmet*/
	if (e.crafting.getItem() == Items.leather_helmet) {
		e.player.addStat(ExtraAchievements.buildHelmetLeather, 1);
	}
	if (e.crafting.getItem() == Items.chainmail_helmet)
        {
                e.player.addStat(ExtraAchievements.buildHelmetChain, 1);
        }
	if (e.crafting.getItem() == Items.iron_helmet)
	{
		e.player.addStat(ExtraAchievements.buildHelmetIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_helmet)
	{
		e.player.addStat(ExtraAchievements.buildHelmetGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_helmet)
	{
		e.player.addStat(ExtraAchievements.buildHelmetDiamond, 1);
	}
	/*Chest*/
	if (e.crafting.getItem() == Items.leather_chestplate) {
		e.player.addStat(ExtraAchievements.buildChestpieceLeather, 1);
	}
	if (e.crafting.getItem() == Items.chainmail_chestplate)
        {
                e.player.addStat(ExtraAchievements.buildChestpieceChain, 1);
        }
	if (e.crafting.getItem() == Items.iron_chestplate)
	{
		e.player.addStat(ExtraAchievements.buildChestpieceIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_chestplate)
	{
		e.player.addStat(ExtraAchievements.buildChestpieceGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_chestplate)
	{
		e.player.addStat(ExtraAchievements.buildChestpieceDiamond, 1);
	}
	/*Legs*/
	if (e.crafting.getItem() == Items.leather_leggings) {
		e.player.addStat(ExtraAchievements.buildLeggingsLeather, 1);
	}
	if (e.crafting.getItem() == Items.chainmail_leggings)
        {
                e.player.addStat(ExtraAchievements.buildLeggingsChain, 1);
        }
	if (e.crafting.getItem() == Items.iron_leggings)
	{
		e.player.addStat(ExtraAchievements.buildLeggingsIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_leggings)
	{
		e.player.addStat(ExtraAchievements.buildLeggingsGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_leggings)
	{
		e.player.addStat(ExtraAchievements.buildLeggingsDiamond, 1);
	}
	/*Boots*/
	if (e.crafting.getItem() == Items.leather_boots) {
		e.player.addStat(ExtraAchievements.buildBootsLeather, 1);
	}
	if (e.crafting.getItem() == Items.chainmail_boots)
        {
                e.player.addStat(ExtraAchievements.buildBootsChain, 1);
        }
	if (e.crafting.getItem() == Items.iron_boots)
	{
		e.player.addStat(ExtraAchievements.buildBootsIron, 1);
	}
	if (e.crafting.getItem() == Items.golden_boots)
	{
		e.player.addStat(ExtraAchievements.buildBootsGold, 1);
	}
	if (e.crafting.getItem() == Items.diamond_boots)
	{
		e.player.addStat(ExtraAchievements.buildBootsDiamond, 1);
	}

	/**Misc**/
	if (e.crafting.getItem() == Items.compass) {
		e.player.addStat(ExtraAchievements.craftCompass, 1);
	}
	if (e.crafting.getItem() == Items.clock) {
		e.player.addStat(ExtraAchievements.craftClock, 1);
	}
	if (Block.getBlockFromItem(e.crafting.getItem()) == Blocks.brick_block) {
		e.player.addStat(ExtraAchievements.craftBricks, 1);
	}
	if (Block.getBlockFromItem(e.crafting.getItem()) == Blocks.glass_pane) {
		e.player.addStat(ExtraAchievements.craftGlassPane, 1);
	}
	if (e.crafting.getItem() == Items.bowl) {
		e.player.addStat(ExtraAchievements.craftBowl, 1);
	}
	if (e.crafting.getItem() == Items.mushroom_stew) {
		e.player.addStat(ExtraAchievements.craftSoup, 1);
	}
	if (Block.getBlockFromItem(e.crafting.getItem()) == Blocks.nether_brick) {
		e.player.addStat(ExtraAchievements.craftNetherBrick, 1);
	}
}

@SubscribeEvent
public void onSmelting(PlayerEvent.ItemSmeltedEvent e) {
	if (e.smelting.getItem() == Items.brick) {
		e.player.addStat(ExtraAchievements.smeltBrick, 1);
	}
	if (e.smelting.getItem() == Items.gold_ingot) {
		e.player.addStat(ExtraAchievements.aquireGold, 1);
	}
	if (Block.getBlockFromItem(e.smelting.getItem()) == Blocks.glass) {
		e.player.addStat(ExtraAchievements.smeltGlass, 1);

	}
	if (e.smelting.getItem() == Items.porkchop) {
		e.player.addStat(ExtraAchievements.cookPork, 1);
	}
	if (e.smelting.getItem() == Items.cooked_beef) {
		e.player.addStat(ExtraAchievements.cookBeef, 1);
	}
	if (e.smelting.getItem() == Items.cooked_chicken) {
		e.player.addStat(ExtraAchievements.cookChicken, 1);
	}
	if (e.smelting.getItem() == Items.netherbrick) {
		e.player.addStat(ExtraAchievements.smeltNetherBrick, 1);
	}
}

}

 

(main class) ExtraAchievements.class:

package dudesmods.extraachievements.extraachievements2;

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import dudesmods.extraachievements.extraachievements2.proxy.CommonProxy;


@Mod(modid = ExtraAchievements.MODID, name = ExtraAchievements.NAME, version = ExtraAchievements.VERSION)

public class ExtraAchievements {

public static final String MODID = "extraachievements";
public static final String NAME = "Extra Achievements";
public static final String VERSION = "2.0.0";

public static AchievementPage ExtraAchievements;
/**Tools**/
/*Hoe*/
public static Achievement buildHoeStone;
public static Achievement buildHoeIron;
public static Achievement buildHoeGold;
public static Achievement buildHoeDiamond;
/*Picks*/
public static Achievement buildPickaxeIron;
public static Achievement buildPickaxeGold;
public static Achievement buildPickaxeDiamond;
/*Swords*/
public static Achievement buildSwordStone;
public static Achievement buildSwordIron;
public static Achievement buildSwordGold;
public static Achievement buildSwordDiamond;
/*Axes*/
public static Achievement buildAxeWood;
public static Achievement buildAxeStone;
public static Achievement buildAxeIron;
public static Achievement buildAxeGold;
public static Achievement buildAxeDiamond;
/*Shovels*/
public static Achievement buildShovelWood;
public static Achievement buildShovelStone;
public static Achievement buildShovelIron;
public static Achievement buildShovelGold;
public static Achievement buildShovelDiamond;
/**Armour**/
/*Helmets*/
public static Achievement buildHelmetLeather;
public static Achievement buildHelmetChain;
public static Achievement buildHelmetIron;
public static Achievement buildHelmetGold;
public static Achievement buildHelmetDiamond;
/*ChestPeices*/
public static Achievement buildChestpieceLeather;
public static Achievement buildChestpieceChain;
public static Achievement buildChestpieceIron;
public static Achievement buildChestpieceGold;
public static Achievement buildChestpieceDiamond;
/*Leggings*/
public static Achievement buildLeggingsLeather;
public static Achievement buildLeggingsChain;
public static Achievement buildLeggingsIron;
public static Achievement buildLeggingsGold;
public static Achievement buildLeggingsDiamond;
/*Boots*/
public static Achievement buildBootsLeather;
public static Achievement buildBootsChain;
public static Achievement buildBootsIron;
public static Achievement buildBootsGold;
public static Achievement buildBootsDiamond;
/*Wither*/
public static Achievement soulSand;
public static Achievement witherSkulls;
public static Achievement witherDead;
public static Achievement craftBeacon;
/**Misc.**/
public static Achievement craftCompass;
public static Achievement craftClock;
public static Achievement aquireClay;
public static Achievement smeltBrick;
public static Achievement craftBricks;
public static Achievement aquireGold;
public static Achievement aquireSand;
public static Achievement smeltGlass;
public static Achievement craftGlassPane;
public static Achievement craftBowl;
public static Achievement craftSoup;
public static Achievement cookPork;
public static Achievement cookBeef;
public static Achievement cookChicken;
public static Achievement aquireNetherrack;
public static Achievement smeltNetherBrick;
public static Achievement craftNetherBrick;

@SidedProxy(clientSide="dudesmods.extraachievements.extraachievements2.proxy.ClientProxy", serverSide="dudesmods.extraachievements.extraachievements2.proxy.CommonProxy")
public static CommonProxy proxy;

@EventHandler
public void preLoad(FMLPreInitializationEvent event) {
	initAchieves();
	AchievementPage.registerAchievementPage(ExtraAchievements);

}

@EventHandler
public void mainLoad(FMLInitializationEvent event) {
	MinecraftForge.EVENT_BUS.register(new AchievementEvent());
}

@EventHandler
public void postLoad(FMLPostInitializationEvent event) {

}

public void initAchieves() {
	aquireGold = new Achievement("achievement.aquireGold", "aquireGold", 1, 6, Items.gold_ingot, AchievementList.acquireIron).registerStat();//Vinilla Page

	/*Hoe*/
	buildHoeStone = new Achievement("achievement.buildStoneHoe", "buildHoeStone", 0, -7, Items.stone_hoe, AchievementList.buildHoe).registerStat();
	buildHoeIron = new Achievement("achievement.buildHoeIron", "buildHoeIron", 1, -7, Items.iron_hoe, buildHoeStone).registerStat();
	buildHoeGold = new Achievement("achievement.buildHoeGold", "buildHoeGold", 1, -6, Items.golden_hoe, buildHoeIron).registerStat();
	buildHoeDiamond = new Achievement("achievement.buildHoeDiamond", "buildHoeDiamond", 2, -7, Items.diamond_hoe, buildHoeIron).setSpecial().registerStat();

	/*Pickaxe*/
	buildPickaxeIron = new Achievement("achievement.buildPickaxeIron", "buildPickaxeIron", 1, -4, Items.iron_pickaxe, AchievementList.buildBetterPickaxe).registerStat();
	buildPickaxeGold = new Achievement("achievement.buildPickaxeGold", "buildPickaxeGold", 1, -3, Items.golden_pickaxe, buildPickaxeIron).registerStat();
	buildPickaxeDiamond = new Achievement("achievement.buildPickaxeDiamond", "buildPickaxeDiamond", 2, -4, Items.diamond_pickaxe, buildPickaxeIron).setSpecial().registerStat();

	/*Sword*/
	buildSwordStone = new Achievement("achievement.buildSwordStone", "buildSwordStone", 0, -1, Items.stone_sword, AchievementList.buildSword).registerStat();
	buildSwordIron = new Achievement("achievement.buildSwordIron", "buildSwordIron", 1, -1, Items.iron_sword, buildSwordStone).registerStat();
	buildSwordGold = new Achievement("achievement.buildSwordGold", "buildSwordGold", 1, 0, Items.golden_sword, buildSwordIron).registerStat();
	buildSwordDiamond = new Achievement("achievement.buildSwordDiamond", "buildSwordDiamond", 2, -1, Items.diamond_sword, buildSwordIron).setSpecial().registerStat();

	/*Axe*/
	buildAxeWood = new Achievement("achievement.buildAxeWood", "buildAxeWood", -1, 2, Items.wooden_axe, AchievementList.buildWorkBench).registerStat();
	buildAxeStone = new Achievement("achievement.buildAxeStone", "buildAxeStone", 0, 2, Items.stone_axe, buildAxeWood).registerStat();
	buildAxeIron = new Achievement("achievement.buildAxeIron", "buildAxeIron", 1, 2, Items.iron_axe, buildAxeStone).registerStat();
	buildAxeGold = new Achievement("achievement.buildAxeGold", "buildAxeGold", 1, 3, Items.golden_axe, buildAxeIron).registerStat();
	buildAxeDiamond = new Achievement("achievement.buildAxeDiamond", "buildAxeDiamond", 2, 2, Items.diamond_axe, buildAxeIron).setSpecial().registerStat();

	/*Shovel*/
	buildShovelWood = new Achievement("achievement.buildShovelWood", "buildShovelWood", -1, 5, Items.wooden_shovel, AchievementList.buildWorkBench).registerStat();
	buildShovelStone = new Achievement("achievement.buildShovelStone", "buildShovelStone", 0, 5, Items.stone_shovel, buildShovelWood).registerStat();
	buildShovelIron = new Achievement("achievement.buildShovelIron", "buildShovelIron", 1, 5, Items.iron_shovel, buildShovelStone).registerStat();
	buildShovelGold = new Achievement("achievement.buildShovelGold", "buildShovelGold", 1, 6, Items.golden_shovel, buildShovelIron).registerStat();
	buildShovelDiamond = new Achievement("achievement.buildShovelDiamond", "buildShovelDiamond", 2, 5, Items.diamond_shovel, buildShovelIron).setSpecial().registerStat();

	/*Helmet*/
	buildHelmetLeather = new Achievement("achievement.buildHelmetLeather", "buildHelmetLeather", 4, -7, Items.leather_helmet, AchievementList.killCow).registerStat();
	buildHelmetChain = new Achievement("achievement.buildHelmetChain", "buildHelmetChain", 5, -7, Items.chainmail_helmet, buildHelmetLeather).registerStat();
	buildHelmetIron = new Achievement("achievement.buildHelmetIron", "buildHelmetIron", 6, -7, Items.iron_helmet, buildHelmetLeather).registerStat();
	buildHelmetGold = new Achievement("achievement.buildHelmetGold", "buildHelmetGold", 7, -7, Items.golden_helmet, buildHelmetIron).registerStat();
	buildHelmetDiamond = new Achievement("achievement.buildHelmetDiamond", "buildHelmetDiamond", 8, -7, Items.diamond_helmet, buildHelmetIron).setSpecial().registerStat();

	/*Chestpiece*/
	buildChestpieceLeather = new Achievement("achievement.buildChestpieceLeather", "buildChestpieceLeather", 4, -6, Items.leather_chestplate, AchievementList.killCow).registerStat();
	buildChestpieceChain = new Achievement("achievement.buildChestpieceChain", "buildChestpieceChain", 5, -6, Items.chainmail_chestplate, buildChestpieceLeather).registerStat();
	buildChestpieceIron = new Achievement("achievement.buildChestpieceIron", "buildChestpieceIron", 6, -6, Items.iron_chestplate, buildChestpieceLeather).registerStat();
	buildChestpieceGold = new Achievement("achievement.buildChestpieceGold", "buildChestpieceGold", 7, -6, Items.golden_chestplate, buildChestpieceIron).registerStat();
	buildChestpieceDiamond = new Achievement("achievement.buildChestpieceDiamond", "buildChestpieceDiamond", 8, -6, Items.diamond_chestplate, buildChestpieceIron).setSpecial().registerStat();

	/*Leggings*/
	buildLeggingsLeather = new Achievement("achievement.buildLeggingsLeather", "buildLeggingsLeather", 4, -5, Items.leather_leggings, AchievementList.killCow).registerStat();
	buildLeggingsChain = new Achievement("achievement.buildLeggingsChain", "buildLeggingsChain", 5, -5, Items.chainmail_leggings, buildLeggingsLeather).registerStat();
	buildLeggingsIron = new Achievement("achievement.buildLeggingsIron", "buildLeggingsIron", 6, -5, Items.iron_leggings, buildLeggingsLeather).registerStat();
	buildLeggingsGold = new Achievement("achievement.buildLeggingsGold", "buildLeggingsGold", 7, -5, Items.golden_leggings, buildLeggingsIron).registerStat();
	buildLeggingsDiamond = new Achievement("achievement.buildLeggingsDiamond", "buildLeggingsDiamond", 8, -5, Items.diamond_leggings, buildLeggingsIron).setSpecial().registerStat();

	/*Boots*/
	buildBootsLeather = new Achievement("achievement.buildBootsLeather", "buildBootsLeather", 4, -4, Items.leather_boots, AchievementList.killCow).registerStat();
	buildBootsChain = new Achievement("achievement.buildBootsChain", "buildBootsChain", 5, -4, Items.chainmail_boots, buildBootsLeather).registerStat();
	buildBootsIron = new Achievement("achievement.buildBootsIron", "buildBootsIron", 6, -4, Items.iron_boots, buildBootsLeather).registerStat();
	buildBootsGold = new Achievement("achievement.buildBootsGold", "buildBootsGold", 7, -4, Items.golden_boots, buildBootsIron).registerStat();
	buildBootsDiamond = new Achievement("achievement.buildBootsDiamond", "buildBootsDiamond", 8, -4, Items.diamond_boots, buildBootsIron).setSpecial().registerStat();

	/**Misc.**/
	craftCompass = new Achievement("achievement.craftCompass", "craftCompass", 4, 0, Items.compass, AchievementList.acquireIron).registerStat();
	craftClock = new Achievement("achievement.craftClock", "craftClock", 5, 0, Items.clock, aquireGold).registerStat();

	aquireClay = new Achievement("achievement.aquireClay", "aquireClay", 3, 1, Items.clay_ball, null).registerStat();
	smeltBrick = new Achievement("achievement.smeltBrick", "smeltBrick", 4, 1, Items.brick, aquireClay).registerStat();
	craftBricks = new Achievement("achievement.craftBricks", "craftBricks", 5, 1, Blocks.brick_block, smeltBrick).registerStat();

	aquireSand = new Achievement("achievement.aquireSand", "aquireSand", 3, 2, Blocks.sand, null).registerStat();
	smeltGlass = new Achievement("achievement.smeltGlass", "smeltGlass", 4, 2, Blocks.glass, aquireSand).registerStat();
	craftGlassPane = new Achievement("achievement.craftGlassPane", "craftGlassPane", 5, 2, Blocks.glass_pane, smeltGlass).registerStat();

	craftBowl = new Achievement("achievement.craftBowl", "craftBowl", 4, 3, Items.bowl, AchievementList.buildWorkBench).registerStat();
	craftSoup = new Achievement("achievement.craftSoup", "craftSoup", 5, 3, Items.mushroom_stew, craftBowl).registerStat();

	cookPork = new Achievement("achievement.cookPork", "cookPork", 6, 3, Items.porkchop, AchievementList.buildFurnace).registerStat();
	cookBeef = new Achievement("achievement.cookBeef", "cookBeef", 7, 3, Items.cooked_beef, AchievementList.buildFurnace).registerStat();
	cookChicken = new Achievement("achievement.cookChicken", "cookChicken", 8, 3, Items.cooked_chicken, AchievementList.buildFurnace).registerStat();

	aquireNetherrack = new Achievement("achievement.aquireNetherrack", "aquireNetherrack", 6, 1, Blocks.netherrack, AchievementList.portal).registerStat();
	smeltNetherBrick = new Achievement("achievement.smeltNetherBrick", "smeltNetherBrick", 7, 1, Items.netherbrick, aquireNetherrack).registerStat();
	craftNetherBrick = new Achievement("achievement.craftNetherBrick", "craftNetherBrick", 8, 1, Blocks.nether_brick, smeltNetherBrick).registerStat();

	soulSand = new Achievement("achievement.soulSand", "soulSand", 6, 2, Blocks.soul_sand, null).registerStat();
	witherSkulls = new Achievement("achievement.witherSkulls", "witherSkulls", 7, 2, new ItemStack(Items.skull, 1, 1), null).registerStat();

	ExtraAchievements = new AchievementPage("Extra Achievements", 
			buildHoeStone, buildHoeIron, buildHoeGold, buildHoeDiamond,
			buildPickaxeIron, buildPickaxeGold, buildPickaxeDiamond,
			buildSwordStone, buildSwordIron, buildSwordGold, buildSwordDiamond,
			buildAxeWood, buildAxeStone, buildAxeIron, buildAxeGold, buildAxeDiamond,
			buildShovelWood, buildShovelStone, buildShovelIron, buildShovelGold, buildShovelDiamond,
			buildHelmetLeather, buildHelmetChain, buildHelmetIron, buildHelmetGold, buildHelmetDiamond,
			buildChestpieceLeather, buildChestpieceChain, buildChestpieceIron, buildChestpieceGold, buildChestpieceDiamond,
			buildLeggingsLeather, buildLeggingsChain, buildLeggingsIron, buildLeggingsGold, buildLeggingsDiamond,
			buildBootsLeather, buildBootsChain, buildBootsIron, buildBootsGold, buildBootsDiamond,
			craftCompass, craftClock,
			aquireClay, smeltBrick, craftBricks,
			aquireSand, smeltGlass, craftGlassPane,
			craftBowl, craftSoup,
			cookPork, cookBeef, cookChicken,
			aquireNetherrack, smeltNetherBrick, craftNetherBrick,
			soulSand, witherSkulls);
}
}

 

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

You are subscribing to FML events, then you need to use the FML EventBus.

MinecraftForge.EVENT_BUS.register(new AchievementEvent());

Is this not the event bus?

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

You are subscribing to FML events, then you need to use the FML EventBus.

That is the Forge EventBus.

 

So what are you telling me to do?

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

I am telling you to use the FML EventBus. You will surely find it if you search for where instances of the EventBus class are created (use your IDE).

You said to use the event bus but then you said i was already using it.

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

And again we have someone posting code :(

 

Yeah, I hoped people would actually use their IDE for sources.

Seriously, people need to start learning on their own instead of people giving them answers (code, in this case).

Posted

FMLCommonHandler.instance().bus().register(new AchievementEvent());

still doesn't work.

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

Posted

So can anyone help me with my problem?

Legend of Zelda Mod[updated September 20th to 3.1.1]

Extra Achievements(Minecraft 1.8!)[updated April 3rd to 2.3.0]

Fancy Cheeses[updated May 8th to 0.5.0]

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I have used mixins once before, and it was with @At RETURN, so it worked fine. Now im trying to use it as INVOKE, and the compilation is successful, but the client crashes almost on startup (just a couple seconds after running runClient)   Im trying to inject the method finishConversion inside the ZombieVillager class. This is my Mixin class important stuff:   import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.monster.ZombieVillager; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(ZombieVillager.class) public class ZombieVillagerCures { @Inject(method = "finishConversion", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/entity/LivingEntity;addEffect(Lnet/minecraft/world/effect/MobEffectInstance;)Z")) private void addZombieVillagerCuredAmmount(ServerLevel level, CallbackInfo info) { System.out.println("The Mixin Worked!!! " + level); } // Lnet/minecraft/world/entity/LivingEntity;addEffect(Lnet/minecraft/world/effect/MobEffectInstance;)Z } I'm sure the issue lies in the @At cuz other @At values work fine. Its probably the fully qualified name thing. idk how to get it in VS code
    • I'm wayy less skilled than you i bet, but maybe u could try to just convert one into the other?
    • wildbackport is not working
    • Through Betafort Recovery, Bitcoin scam victims can retrieve their money. I recommend Betafort Recovery to anyone who has fallen victim to a scam and has been looking for methods and techniques to recover their lost cryptocurrency or wallets. Betafort Recovery is a reliable cryptocurrency recovery firm that assists victims in recovering their stolen cryptocurrency and offers secure solutions to protect your wallets from online scammers. I must admit that I was deeply melancholy and had given up on life until these experts could restore my $23,400 to my wallet. If you've lost your cryptocurrency and you are helpless about it, contact Betafort Recovery to get your money back. One key aspect that makes Betafort Recovery stand out is its focus on providing secure solutions to protect wallets from online scammers. It's not just about recovering lost funds; it's also about preventing future incidents and ensuring that clients' digital assets are safeguarded against potential threats. This proactive approach demonstrates their commitment to the long-term financial security of their clients. Furthermore, for individuals who have lost their cryptocurrency and are feeling helpless, reaching out to Betafort Recovery could be a turning point in their situation. The reassurance that they are legitimate for seeking help and recovering lost funds can provide much-needed relief and a sense of empowerment. Betafort Recovery as a reliable cryptocurrency recovery firm is certainly well-founded. Their ability to assist scam victims in recovering stolen cryptocurrency, their focus on providing secure solutions, and their commitment to supporting clients through challenging situations make them a valuable resource for individuals navigating the complex world of digital currencies. If you or someone you know has fallen victim to a cryptocurrency scam, contacting Betafort Recovery could be the first step towards reclaiming lost funds and regaining peace of mind.  
    • Idk how i didn't notice that, but I deleted it and fixed some other issues and now I get this https://mclo.gs/YsWacqq
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.