Jump to content

[SOLVED] [1.12.2] Entity (Projectile) Rendering - Dislocating Entity Problem


Recommended Posts

Posted (edited)

I've got a projectile entity that works perfectly, but if I fire it at a speed over about 1-2 once it hits a block it renders back about 3 blocks, after a while (a few seconds before the entity's lifespan runs out) the renderer renders properly - This isn't the fault of my renderer, it happens with forges default white box renderer too, but only at speeds higher than a normal arrow.

Ive seen a topic from a long time ago about the same problem (they were rendering an Entity Spear) but they didn't get a solution to it, Im hoping that someone knows the solution to this problem. Tinkers construct seems to have solved this problem by making all their projectiles extend Arrow, but it seems like an inelegant solution and it would be great if there was a better one.

 

 

EntityRailgunProjectile.java

  Reveal hidden contents

 

RenderEntityRailgunProjectile.java

  Reveal hidden contents

 

 

Screenshots:

 

Untitled.thumb.png.17bb15bc50759cb34337a79a4352839e.pngUntitled2.thumb.png.eca66a23fba5a4d4ef0bbf5258fcda26.pngUntitled3.thumb.png.9af7340d80cb8de7be331d22c2de2d96.pngUntitled4.thumb.png.35efa8ba86c63ac3627248e9569be6b0.pngUntitled5.thumb.png.91f3fe4d19565def7355bc2402e5584f.pngUntitled6.thumb.png.1fd7162d8cef066dfc87d257fb9cf20b.png

 

Renderer renders normally right before the entity is killed

 

Untitled7.thumb.png.d5e3fcdd40d44afbe7b2840a67a193eb.pngUntitled8.thumb.png.0dc28ca5ab7918f26c9c1b26a3d5dc85.png

Edited by Cadiboo
solved 1.12.2

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

  • 1 month later...
Posted
  On 3/14/2018 at 11:32 AM, Cadiboo said:

Tinkers construct seems to have solved this problem by making all their projectiles extend Arrow, but it seems like an inelegant solution and it would be great if there was a better one.

Expand  

Thats the solution. A lot of code is apparently handled specifically if the entity extends arrow, so you pretty much have to extend it.

My current code that works perfectly

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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.