Projectile Attack

Started by Juplicate on Wed, 06/03/2020 - 00:33

Topic category: Help with modding (Java Edition)

Last seen on 02:47, 11. Feb 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Projectile Attack
Wed, 06/03/2020 - 00:33

 I want to make it so my boss does multiple attacks at certain hp values. Any way to do that? Also is there a way for it to have multiple ranged attacks?

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yes, just use if statements…
Wed, 06/03/2020 - 02:49

Yes, just use if statements. I am not giving code, but here is an example;

    @Override
    public void attackEntityWithRangedAttack(LivingEntity target, float distanceFactor) {
        ProjectileItemEntity entity;
        if (this.getHealth() >= 7) {
            entity = new ProjectileEntity1(this.world, this);
        } else {
            entity = new ProjectileEntity2(this.world, this, true);
        }
    }

 

Last seen on 02:47, 11. Feb 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is there a way to make it so…
Wed, 06/03/2020 - 13:49

Is there a way to make it so it does the code once and then stops? I tried using tick entity update

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
attackEntityWithRangedAttack…
Wed, 06/03/2020 - 15:12
attackEntityWithRangedAttack

This method, provided by IRangedAttackMob, allows the entity to "shoot". Doesn't your ranged mob have this method in the class?

Last seen on 02:47, 11. Feb 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I don't understand a single…
Wed, 06/03/2020 - 16:10

I don't understand a single thing you said.

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Lol, send over the entire…
Wed, 06/03/2020 - 16:44

Lol, send over the entire entity class, preferably in a git/pastebin. What Minecraft version are you using/

Last seen on 02:47, 11. Feb 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
1.15.2, what is an entity…
Wed, 06/03/2020 - 17:42

1.15.2, what is an entity class?, and I have no idea how to get a pastebin, can I just send a screenshot?