I need help with Pokeball procedures

Started by Atten007 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help with Pokeball procedures

Hello,

I'm currently working on my Pokemon mod "Craftelmon". I'm adding new Pokemon to this mod and I want to have a system that when the player drops one of the Pokeball items on a Pokemon, a procedure with a 50/50 (or 25/75, 75/25 for some other Pokemon) chance should be started, at which a message with the content "Trying to catch "POKEMON_NAME"..." should appear. After a few seconds, the screen should show "Successfully catched "POKEMON_NAME"!" or "Oh no! "POKEMON_NAME" has fled!". If the Pokemon has been successfully catched, a Pokeball with the Pokemon inside (saved in NBT data) should be added to the inventory of the player. When the player right clicks with the ball in his hand, the Pokemon should be released and if the player clicks right again with the Pokeball, the Pokemon should be added to the inventory of the player again. But I don't know how I can do this. Can someone help me with this?

Greetings,

Atten :)