How to make a mob break blocks above

Started by Stardust178 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a mob break blocks above
Mon, 08/01/2022 - 09:59 (edited)

My walrus mob goes to swim but can't get back to the surface. How do I make it breaks ice blocks that are right above it and then jump onto the surface?

Walrus mob under ice

 

 

Edited by Stardust178 on Mon, 08/01/2022 - 09:59
Add a procedure on mob tick…
Wed, 07/27/2022 - 21:35

Add a procedure on mob tick

If -block x y+1 z = ice

place air block at x y+1 z 

set location of entity to x+1, get world surface height x+1 z, z

 you could also make it so the block also makes a breaking sound and has breaking particles when it replaces it with air but that's about the best way you can have it

Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@NerdyPuzzle I tried this…
Mon, 08/01/2022 - 10:45

@NerdyPuzzle I tried this but it didn't work.-

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your procedure is checking…
Mon, 08/01/2022 - 16:16

Your procedure is checking for ice blocks on y: 1. It's a simple fix though, you just need to use y + 1 instead. Also, the procedure is getting the world height at x: 1 and the z of your entity. I hope this helps.

You need to replace your get…
Sat, 08/27/2022 - 04:48

You need to replace your get block with a math section addition block (the one that has []+[]) and the number 0. Make make it get a block at [y]+1 not 1. Also set the location to x+1, surface height of x+1 z, z