Posted September 11, 201411 yr Hi at all, i immediately explain my problem. I want to create an achievement that be triggered when I pick up a Lapis Lazuli, the problem is that the Lapis Lazuli is a dye and it create a problem with the mod that I'm making, because if i insert the code of the Lapis Lazuli the achievement don't be triggered but if i remove the metadata and I leave only the data of the ink sac, it working. Can anyone explain me that?
September 11, 201411 yr Could you show code if the above still doesn't help? Check out my blog! http://www.whov.altervista.org
September 11, 201411 yr Author Here's the code: MineEvent/Pickup Event: public class MineEvent { @SubscribeEvent public void getMinedThings(PlayerEvent.ItemPickupEvent e){ if(e.pickedUp.getEntityItem().isItemEqual(new ItemStack(Items.dye, 1, 3))){ e.player.addStat(GenericMod.LapisLazuliAchievement, 1); } } } GenericMod class: @EventHandler public void load(FMLInitializationEvent event) { LapisLazuliAchievement = new Achievement("achievement.LapisLazuliAchievement", "LapisLazuliAchievement", 8, 4, new ItemStack(Items.dye, 1, 4), AchievementList.buildBetterPickaxe).registerStat(); FMLCommonHandler.instance().bus().register(new MineEvent()); proxy.registerRenderers(); } } I've taken away many thing as you see, but in the original class there are still here.
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.