Jump to content

Recommended Posts

Posted

Hello everyone,

I created a bullet, which can be shot using a rifle. Everything is working as it should. 

The problem is, that the bullet is not moving smoothly through the air. Very often it glitches back.

As I'm not sure how to fix this issue, I would appreciate any help.

 

EntityBullet:

  Reveal hidden contents

 

RenderBullet:

  Reveal hidden contents

 

ModelBullet:

 

  Reveal hidden contents

 

Utils:

  Reveal hidden contents

 

Posted (edited)

Extending ArrowEntity fixes some of this.

More info here and here.

Edited by Cadiboo
  • Like 1

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)

Posted

Add velocity also need to be done on client side to provide smooth movement.

Some tips:

  Reveal hidden contents

 

Posted (edited)

Thank you very much for your replies. 

I tried your recommendations and found, that adding the velocity only on the server and using the update frequency, that vanilla uses for EntityArrow (20) works the best.

 

EntityBullet:

  Reveal hidden contents

 

EntityRegistry:

  Reveal hidden contents

 

Edited by Lyon
Posted
  On 1/16/2020 at 6:48 PM, Lyon said:

EntityRegistry.registerModEntity(new ResourceLocation(Reference.MODID + ":" + name), entity, name, id, Main.instance, range, frequency, true);

Expand  

Don't use this, use the EntityEntry.Builder.

  • Like 1

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.