Projectile Attack

Started by Juplicate on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Projectile Attack

 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?

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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);
        }
    }

 

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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?

Joined Mar 2020
Points:

User statistics:

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

I don't understand a single thing you said.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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/

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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?