Fan block pushing player

Started by AMinecraftPlayer on Tue, 07/05/2022 - 08:49

Topic category: Help with modding (Java Edition)

Last seen on 14:38, 20. Jul 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Fan block pushing player
Tue, 07/05/2022 - 08:57 (edited)

Hello, I was working on a small mod for my server mostly for minigames. I was looking for a way to push players with a fan block. The fan block has different rotations and depending on the rotation if the player stands in front of the player they get pushed. 
So, far I have done as shown in the image. It seems to be working for items and other entities (when I set it to living entity or mob) but it just doesn't work for players. 
Can someone please help me with this. not sure how to approach this.
https://imgur.com/a/jPUHJBc

From my testing, it seems to only work(pushes the player) if i set the trigger to when right-click on the block. And I need to keep on right-clicking the block for it to work. (I wanted it to be active permanently or when powered by Redstone)

Edited by AMinecraftPlayer on Tue, 07/05/2022 - 08:57
Last seen on 01:56, 8. Aug 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
For some reason, player…
Sat, 07/30/2022 - 04:45

For some reason, player velocity seems to have problems being overriden by blocks. (I ran into a similar problem while trying to make a block that launched things away from it when powered- it worked for ever mob except the player.) Instead, use the override motion vector block- instead of making the trigger run through the block, make a procedure that triggers on player tick update to check for the fan block within a certain radius of the player, and adjust their velocity based on the direction of the block, and its position relative to the player.