Jump to content

I need some help with entities


austinv11

Recommended Posts

It seems that I still don't know anything about entities. I am unable to spawn my entity ( https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src%2Fmain%2Fjava%2Fcom%2Faustinv11%2Fperipheralsplusplus%2Fentities%2FEntityRocket.java ) through my ItemRocket ( https://github.com/austinv11/PeripheralsPlusPlus/blob/master/src%2Fmain%2Fjava%2Fcom%2Faustinv11%2Fperipheralsplusplus%2Fitems%2FItemRocket.java ).

 

Quick side note: Whenever I drop my ItemRocket onto the ground, it spawns the entity on my head, permanently http://puu.sh/d7K6P/ad66ab5010.png no clue at all how I managed that.

 

Thanks!

Link to comment
Share on other sites

Your renderer is broken, it's always rendering it at the player coordinates (that's what's causing it to "spawn" on your head)

 

In your renderRocket() method you need to translate (

glTranslatef

) by the first 3 coordinates.

 

Here are the "correct" parameter names for the doRender() method:

https://github.com/SanAndreasP/ClaySoldiersMod/blob/master/java/de/sanandrew/mods/claysoldiers/client/render/entity/RenderClayMan.java#L39

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

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.

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
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.



×
×
  • Create New...

Important Information

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