how to make tamed mob mining for you

Started by asadelFery on Tue, 08/03/2021 - 00:57

Topic category: Help with modding (Java Edition)

Last seen on 12:16, 31. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how to make tamed mob mining for you
Tue, 08/03/2021 - 01:53 (edited)

so i making mob then when you sneak it will mine for you for 10 sec at your direction

Edited by asadelFery on Tue, 08/03/2021 - 01:53
Last seen on 02:01, 27. Aug 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
So similar to the old…
Wed, 08/04/2021 - 02:35

So similar to the old Minions mod?

 

(A Mob dug a quarry)

 

But I think I understand so ill give a basic run down on the logic for it

 

OnEntitySpawn procedure

  • Set number NBT tag "Countdown" to 10

 

OnPlayerTick

  • If PlayerMP is sneaking AND hasEntity is True
  •  - - while Entity's Countdown > 0
  •  - - - (set up a way for it to mine here)
  •  - - - Set NBT Countdown to Countdown - 1
  •  - - - Wait 20 ticks
  •  - - - - Keep Empty this just makes it wait a second (20 ticks) before looping
  •  - - Set Countdown to 10 (this is outside of the While loop to reset the Entity)

 

This isn't a full play by play but its a rough outline of logic to build on