How to get a block to go towards a player at first

Started by shadowmaster2119 on Sat, 10/19/2019 - 02:41

Topic category: Help with MCreator modding

Last seen on 07:02, 10. Nov 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How to get a block to go towards a player at first
Sat, 10/19/2019 - 02:41

I am trying to work around a problem where projectiles don't do anything. I am instead using blocks that are the projectile. I need to figure out how to get the block to go towards the player when it spawns but than keeps going in that direction. Does anyone know anyway I could do this?

Thanks,

Shadow

Last seen on 00:29, 12. Nov 2019
Joined Aug 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You could try getting the…
Sat, 10/19/2019 - 09:09

You could try getting the player's xyz coordinates using entity NBT tags and when the block is spawned, check whether the x,y,z of the block is bigger or smaller and use movement based on that information to determine direction.

Could be that there's a better way. I'm not sure if using blocks for projectiles is the best option.

Last seen on 07:02, 10. Nov 2019
Joined Sep 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Ok thanks! I'll try that…
Sat, 10/19/2019 - 23:29

Ok thanks! I'll try that. Sadly using blocks for custom projectiles is the only way to get a mob to be able to "use" ranged weapons and have a projectile that has certain traits when it touches a player

Thanks,

Shadow