Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.7.10] Rideable Entity with custom left/right click


MCRaichu
 Share

Recommended Posts

Hi,

I'm new to this forum as well as minecraft modding and made my way through several tutorials. I create a custom rideable entity (a mech) and now I want to override the behaviour of the left and right mouse-button while a player is "riding" it. Basicly I want it to fire two different weapons.

My questions are:

- What is the "easiest/fastest" way of doing that? (I know it wont be easy)

- How should I implement the weapons?

- Are there any tutorials covering something related to that?

 

My first idea was to create an item like a "controller" which the player needs to hold in the hand an just use its onRightClick but thats not what i want...

 

Any ideas/suggestions are welcome.

 

Thanks in advance,

McRaichu

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

I get the first part: register an eventhandler in the eventbus and there check if the player is riding and check for left/right click. what should/could I do about the weapon part?

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

Basically I have two ideas:

1.: Create a Gui which allows the player to insert range-weapons (bow or custom one) and use them

2.: just use the spawnEntityInWorld (like from the snowball) and fire something

 

the second idea would be the easiest i guess but the first one would allow more possibilities for the player. What do you think is the best decision?

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

I have a small problem. Since the mecha model has weapons on it (e.g. rocktelauncher on the shoulder) how do i achieve the displacement from the players position when a for example a bow is used?

It doesn't work, I don't know why.

It works, I don't know why.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

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