Jump to content

[Solved + example Code][1.5.2][Forge 8.7.705] Custom Bow in Third Person View


Recommended Posts

Posted

Hello everyone,

 

[solved Problem, see red info for fixes and blue for deletion]

[MAKE SURE YOUR CLIENTPROXY public void matches your COMMONPROXY public void, that helped me a lot]

 

Simple problem I got here, my custom bow (pleomBow) will not work register as a normal bow, seen sideways at the players side when shooting in third person mode. If you do not know what I mean, then go in normal minecraft and shoot a bow in third person. Chances are the arrow is pointing right at you. I want that same effect for my custom bow.

 

I included a pastebin link for each class, I think its a great idea that I added both methods of viewing the code. :P

Things I've done:

-Classes

 

pleomBow Class [PasteBin Link = http://pastebin.com/zpUQ3Pux]

 

  Reveal hidden contents

 

 

RendererItemBow [PasteBin = http://pastebin.com/fMxVeepd] [original code from here https://gist.github.com/SanAndreasP/5608824]

 

  Reveal hidden contents

 

 

ClientProxy [Pastebin = http://pastebin.com/NFmKNyVF]

(I debugged my code to discover that this ClientProxy was the source of my problems with the bow, not rendering, See code for details and changes)

 

  Reveal hidden contents

 

 

and Lastly A bit of my main class (keyCore.class) [ Pastebin = http://pastebin.com/kZGCQzVu]

 

  Reveal hidden contents

 

 

 

Any thoughts or need for code, I will check back tomorrow on this post at 3:45pm EST.

 

Thanks for the help.

Posted
  On 5/20/2013 at 2:22 AM, keynah said:

Simple problem I got here, my custom bow (pleomBow) will not work register as a normal bow, seen sideways at the players side when shooting in third person mode.

 

Say what? will not work register as a normal bow?

 

And also, what I got from this was that you WANTED to have the player appear to shoot himself?

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

In third person mode, with normal minecraft using a bow. The player will knock back the bow loaded with an arrow. Other players are able to see this animation as well. It looks really cool in my opinion also.

 

What I want, is for my custom how to have the same render in 3d knocking back the arrow And having it point where ever I look. Instead of the bow texture being sideways like any other normal item.

 

Did that clear things up?

Posted

yes it did. I would suggest looking into the actual ItemBow class and then copying it all to your bow class, and then trying to figure out how it does the textures. Best way to learn is to be pointed in the right direction xD

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

I basically copy pasted the itembow class itself, only difference was the 2-3 hours trying to get the custom pull back textures to work.

 

Any other advice on how to have the custom bow render?

Anyone?

Posted

Give me a few minutes... Ill have an example for you...

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

There was a similar thread:

 

Assuming you have at least Forge 7.8.0.700, I've made an ItemRenderer which can be used for every bow: https://gist.github.com/SanAndreasP/5608824

You need to bind the renderer to your item. You can bind the renderer to multiple items.

Note that this does not support multiple render passes. You have to figure this out for yourself if you need those.

 

Please don't return true in isFull3d() if you happen to have that method. Also counts for the shouldRotateWhenRendering()

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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