How to make mobs have a random sword?

Started by Badgino56 on

Topic category: Help with modding (Java Edition)

Last seen on 02:23, 8. May 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make mobs have a random sword?

I dont like seeing my mobs have the same old weapon every time so I would like to know how to make a mob spawn with a random sword every time it spawn ( like the zombie sometimes spawning with a tool )

Last seen on 05:19, 19. May 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a standalone procedure …
Tue, 03/22/2022 - 03:01
  1. Make a standalone procedure (name it as you like)
  2. Set global trigger to: Entity Spawns
  3. Add an "if" block with target entity (sub)type of <[desired_entity]>
  4. Add a random block 0,1 ... with a (0.1), this (the example) will give you 10 options
  5. Add "set item in main-hand" block for each option
  6. add the disired items/weapons (1 each)
  7. Save and test

 

EXAMPLE FOR 10 OPTIONS:

Last seen on 05:19, 19. May 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Forgot to mention, it will…
Tue, 03/22/2022 - 03:02

Forgot to mention, it will be a random weapon in hand every time this entity spawns.

Last seen on 02:23, 8. May 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank You This Helped Alot!
Tue, 03/29/2022 - 17:53

Thank You This Helped Alot!