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

if anyone has any idea how to do the below in 1.9.4 it would be appreciated.

 

Just to clarify, the below code is part of an entity file. The entity, when aggro'd would display a fully drawn bow. Once fired, the animation would cycle back to fully drawn. When the entity had no target, the bow animation was the default(undrawn). It was largely a reversal of animation order, tied to the entity animation counter.

 

I can see how the bow files getIcon method was update to the addPropertyOverride method, but have no idea how to tap into that from the entity file. I'm not really sure where to go from there.

 

 

 

//from EntityLizardmanStalker

 

@Override

    @SideOnly(Side.CLIENT)

    public IIcon getItemIcon(ItemStack p_70620_1_, int p_70620_2_)

    {

        IIcon iicon = super.getItemIcon(p_70620_1_, p_70620_2_);

 

        if(this.getHasTarget() == 2 && p_70620_1_.getItem() instanceof ItemBow)

          {

                int j = 0 + this.animationTimer;

 

                if (j >= 15)

                {

                    return ((ItemBow)p_70620_1_.getItem()).getIcon(p_70620_1_, 0);

                }

 

                if (j > 10)

                {

                return ((ItemBow)p_70620_1_.getItem()).getItemIconForUseDuration(0);

                }

 

                if (j > 5)

                {

                return ((ItemBow)p_70620_1_.getItem()).getItemIconForUseDuration(1);

 

                }

                if (j >= 0)

                {

                return ((ItemBow)p_70620_1_.getItem()).getItemIconForUseDuration(2);

                }

          }

        else

            //

        if(this.getHasTarget() != 2) {

        iicon = //p_70620_1_.getItem() == Items.bow ?

            ((ItemBow)p_70620_1_.getItem()).getIcon(p_70620_1_, 0);// :

            //((boneGripBow)w2theJungle.boneGripBow).getIcon2(p_70620_1_, p_70620_2_, (EntityLivingBase)this, this.attackStatus, this.attackTime);

        }

        return iicon;

    }

 

 

  • Author

I can't start my mod up atm, 230+ errors to go still, but it looks like the new entityAiAttackRangedBow class has some conditions that might produce the same effect. we'll see. hopefully.

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.