Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I have been creating a custom arrow and I have managed to solve just about everything except one weird piece of behavior and maybe someone here can help me.  I have copied the arrow code and sorted the custom texture bits out.

 

When the arrow is shot it behaves as expected, renders correctly and so forth unless the range of the shot is under about 4 blocks, then the arrow renders either next to the character or about 2 blocks out from the target though the arrow is in the correct place (as determined by going and picking it up) just not rendered right.

 

Is this an issue with the below code or should I be looking elsewhere?

 

Register code
  EntityRegistry.registerGlobalEntityID(Entitybolt.class, "MagicBolt",EntityRegistry.findGlobalUniqueEntityId());
  EntityRegistry.registerModEntity(Entitybolt.class, "MagicBolt", EntityRegistry.findGlobalUniqueEntityId(), this, 41, 3, true);

 

or

 

From Entitybolt.java

    @Override
    @SideOnly(Side.CLIENT)
    public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
    {
        this.setPosition(par1, par3, par5);
        this.setRotation(par7, par8);
    }

 

You are registering your entity twice.

EntityRegistry.registerGlobalEntityID(Entitybolt.class, "MagicBolt",EntityRegistry.findGlobalUniqueEntityId());

Remove this part. And chose a number instead of using EntityRegistry.findGlobalUniqueEntityId().

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.