Mobs summoning in walls when using custom item to summon it

Started by Falkspyro on

Topic category: Help with MCreator software

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mobs summoning in walls when using custom item to summon it

As the title says, when i use my custom item which spawns a mob when right clicked and im too close to a wall it spawns inside the wall. Is there a way to make it spawn in the closest air block? 

I've tried a few things. Only spawning it, if the player is in a big enough radius of air. That worked, but i want you to be able to summon it, even in tight  spaces where there might only be one air block available. 

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello thanks for your reply…
Tue, 08/02/2022 - 22:28

Hello thanks for your reply. Would i be able to something when shooting with a projectile that spawns a entity upon hitting a wall. I have done the spawn x y+1 z, but i want them to spawn in air, and air only.

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If and get block at x y z is…
Fri, 08/19/2022 - 06:05

If and get block at x y z is the same as air
           get block at x y+1 z is the same as air
do (mob summoning procedure)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the block face direction…
Sun, 08/21/2022 - 19:43

Use the block face direction to determine where the entity should spawn for the block you are clicking.