Jump to content

Detect when player right clicks entity [Solved]


Spaceboy Ross

Recommended Posts

Just now, Spaceboy Ross said:

I'm trying to have a function run when a player right clicks an entity and then to have the player ride it but I need the player to be positioned at a specific spot so they could see but their model isn't visible. I'm trying to do this in 1.12.

Is this your own custom entity?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

8 minutes ago, Spaceboy Ross said:

Yes.

Override Entity#processInteract for right clicking

 

Override Entity#updatePassenger for proper positioning.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.