new achievement drop wood

Started by AlChimiK on

Topic category: Help with Minecraft modding (Java Edition)

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

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.

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 ?