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

Started by shadowmaster2119 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get a block to go towards a player at first

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

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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