Help with blinded levitation effect for my mod.

Started by Nanobott on Fri, 05/13/2022 - 11:22

Topic category: Help with modding (Java Edition)

Last seen on 16:11, 21. Jun 2022
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with blinded levitation effect for my mod.
Fri, 05/13/2022 - 11:22

I'm trying to make a mod when you use a magic item the player gets an effect where the player will levitate up and down while blinden. I have made this with the effect procedure but the problem is if you open your inventory the player can see the effects being applied like the icons in right corner of the inventory.

91Arrows commented a workaround: 

- instead of using levitation and slow falling, use the block "Attempt to override motion vector of [Event/target entity] to", and set the y value to around 0.1 when going up and -0.1 when it's going down, and instead of blindness, if you don't want to show the effect, use your own overlay

I tried this in many possible ways like this one with a test item:
https://imgur.com/a/Ya3k6Qi

I tried it with the set gravity to true asswell but the same thing happens exept the player now just doesnt fall down.

Tried with every Y position block there is but the same thing will happen or the player just wont move p and down untill its hit and moves for 1 tiny bit and then gets stuck again.

 

Could anyone try to help me with this? :D

Last seen on 16:02, 17. Jun 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ok so when overriding the…
Fri, 05/13/2022 - 23:29

Ok so when overriding the motion vector's you'll want to add a math operation, that reads

x

y velocity of entity + #

z

This will attempt to add the current velocity to the # you input. if you want a continuous floating effect leave it like this, but if you want it to launch the player up but not continuously float up while holding right click, then add a if statment that says IF entity is on ground > do your logic.

 

https://i.imgur.com/KvBz225.mp4

Last seen on 16:11, 21. Jun 2022
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Not really what i was…
Sun, 05/15/2022 - 17:24

Not really what i was looking for but still thanks! Helps a lot with different things i planned:D