Started by
AlChimiK
on
Topic category: Help with Minecraft modding (Java Edition)
Hello :)
I would like to create some achievements.
But i don't know how i can add for exemple the event add 64 wood in the inventory to do an achievement???
Can you help me please ? thank you very mutch
Well, you will probably need an event handler (That's practically GUI overlay element itself), subscribe for LivingEvent.LivingUpdateEvent event, check if event.entity is instance of EntityPlayer and if yes, then use for loop to loop through player's inventory (Inventory you can get using ((EntityPlayer)event.entity).inventory ) and then you will check if the Item of current ItemStack is wood, if the size is equal to 64 and then you will make the achievement.
is it possible to have an exemple of creating achievement ?