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

    • Thank you so much Choonster! That's what i was missing! For now i added a folder assets/<mod_id>/items and put the model definition JSON file with the item name in it: { "model":{ "type": "minecraft:model", "model": "teleportpugmod:item/teleportpug" } }   Some log errors/warnings pointing me into the right direction would've been nice 😅 Haven't had much time to look into the DataGenerator and ModelProviders, because i'm still at work. But i guess these would would make more sense if have many custom items and want to generate these model definition files?
    • Minecraft 1.21.4 requires a new model definition file for each item, which you don't have. These can be created through Data Generation, specifically the ModelProvider, BlockModelGenerators and ItemModelGenerators classes.
    • Hi,  I'm using Forge 47.3.0 for Minecraft 1.20.1 I apologise if this is obvious I am very new to modding for Minecraft. I sucessfully made a mod that launched without errors or crashes (without it doing anything) but in order to add the features I need, I need to add "Custom Portal API [Forge]" as a dependency. However no matter the way I've tried to acheive this, it crashes. I am pretty sure it's not the way I'm putting it in the repositories, the dependencies or the way I'm refrencing it, as I've a hundred diffrent combinations and multiple Maven methods. And on all those diffrent variations I still get this crash: pastebin.com/UhumzZCZ Any tips would be invaluable as I've been loosing my mind over this!
    • Hi, i'm really having problems trying to set the texture to my custom item. I thought i'm doing everything correctly, but all i see is the missing texture block for my item. I am trying this for over a week now and getting really frustrated. The only time i could make the texture work, was when i used an older Forge version (52.0.1) for Minecraft (1.21.4). Was there a fundamental change for textures and models somewhere between versions that i'm missing? I started with Forge 54.1.0 and had this problem, so in my frustration i tried many things: Upgrading to Forge 54.1.1, created multiple new projects, workspaces, redownloaded everything and setting things up multiple times, as it was suggested in an older thread. Therea are no errors in the console logs, but maybe i'm blind, so i pasted the console logs to pastebin anyway: https://pastebin.com/zAM8RiUN The only time i see an error is when i change the models JSON file to an incorrect JSON which makes sense and that suggests to me it is actually reading the JSON file.   I set the github repository to public, i would be so thankful if anyone could take a look and tell me what i did wrong: https://github.com/xLorkin/teleport_pug_forge   As a note: i'm pretty new to modding, this is my first mod ever. But i'm used to programming. I had some up and downs, but through reading the documentation, using google and experimenting, i could solve all other problems. I only started modding for Minecraft because my son is such a big fan and wanted this mod.
    • Please read the FAQ (link in orange bar at top of page), and post logs as described there.
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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