Started by
damiansb
on
Topic category: Help with MCreator software
Hello, guys. I'm implementing a procedure to heal a rideable custom entity when I right click on it holding an Iron Ingot (similar to the way you heal an Iron Golem).
I can't figure out a way to prevent the player to mount on the entity when I right click, tho. The healing occurs, but I have to dismount every time to right click again. Anyone have any idea of how I can implement this?
Screenshot of the procedure below:
I believe the mounting bit in MCreator is "checked" first before the entity right-clicks procedure, rendering entity right-click procedure useless on rideable entities.
If you know how (or want) to code. Here is a snippet from the horse source code; Keep in mind itemstack is the item "used on the horse".
This snippet is checked before the mounting bit.
Thanks for your reply. I have a lot of experience in PHP coding for web developing, but never really coded in Java.
I tried to figure out how to do it with your solution, but couldn't make it work.
So I decided to implement a Welding Torch and made the procedure to "fix" the damaged speeder on the PlayerCollision procedure. As long as I have a Welding Torch on the main hand and Some Iron Plating on the Off Hand, this Speeder will repair 4 damages every 1.5 second and use 1 Iron Plating, when I touch it.
The result is pretty neat! :D
Thanks a lot for your help.