new achievement drop wood

Started by AlChimiK on Thu, 02/09/2017 - 00:00

Topic category: Help with modding (Java Edition)

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
new achievement drop wood
Thu, 02/09/2017 - 00:00

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 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 ?