new achievement drop wood

Started by AlChimiK on

Topic category: Help with modding (Java Edition)

Last seen on 21:57, 9. Feb 2017
Joined Feb 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
new achievement drop wood

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

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, you will probably need
Thu, 02/09/2017 - 01:14

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.

Last seen on 21:57, 9. Feb 2017
Joined Feb 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is it possible to have an
Thu, 02/09/2017 - 19:32

is it possible to have an exemple of creating achievement ?