Increased weapon attack range?

Started by Pootis_Hurm on

Topic category: General discussion

Active 4 years ago
Joined Dec 2019
Points:
638

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Increased weapon attack range?

Is it possible to make weapons with increased attack ranges? To make it work like a spear or an halberd.

Active 3 years ago
Joined Mar 2020
Points:
1247

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1149
I think that these values…
Wed, 05/20/2020 - 15:12

I think that these values are hard coded into Minecraft but I’m not sure.

Active 3 years ago
Joined Feb 2018
Points:
690

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
it is possible but might be…
Wed, 06/24/2020 - 11:30

it is possible but might be hard to edit. Crispy made once a spear with a far range of attack so maybe he could help you.

Active 1 month ago
Joined Jun 2019
Points:
2777

User statistics:

  • Modifications: 4
  • Forum topics: 48
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3716
Crispy made once a spear…
Wed, 06/24/2020 - 11:48

Crispy made once a spear with a far range of attack

???

I don't recall making a spear

I think that these values are hard coded into Minecraft but I’m not sure.

I don't think they are hardcoded or at least forge adds apis to change this since a lot of mods do this.

 

Active 3 years ago
Joined Mar 2020
Points:
1247

User statistics:

  • Modifications: 2
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1149
Oh, and it might be easier…
Wed, 06/24/2020 - 11:58

Oh, and it might be easier to do in the future because of the combat snapshots, they have a new weapon stat called reach.

Active 3 years ago
Joined Jan 2021
Points:
537

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
I have found a Solution, but…
Tue, 01/05/2021 - 13:46

I have found a Solution, but critical damage and sweeping edge would not work.

I discovered this while working on a decreased attack range for a dagger

First, set attack damage to zero.

You can code a Procedure, where you use 

If [(XposTarget-x)^2 + (YposTarget-y)^2+(ZposTarget-z)^2]^0.5=a {

     Deal [b] damage to [target Entity] type: "GENERIC"

}

This means that if the target is within an "a" block radius around you, you would deal b damage if they have no armor.

Active 3 years ago
Joined Jan 2021
Points:
537

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
Also, the procedure should…
Tue, 01/05/2021 - 13:52

Also, the procedure should be used for left clicking.

Active 4 hours ago
Joined Mar 2021
Points:
956

User statistics:

  • Modifications: 3
  • Forum topics: 37
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 451
Hi, did you succeed in…
Mon, 04/12/2021 - 18:54

Hi,

did you succeed in adding splash damage ? Can you please show me procedure ?

 

Active 1 year ago
Joined Jul 2018
Points:
727

User statistics:

  • Modifications: 2
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 28
could you possibly add a…
Sun, 06/13/2021 - 00:06

could you possibly add a screenchot of this procedure as i am struggling to find the correct blocks

Thanks :)

Active 11 months ago
Joined Jul 2023
Points:
109

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
Here is what I was able to…
Mon, 07/24/2023 - 01:42

Here is what I was able to do using Achillean_Nestoris' code, but when I test it in-game, it doesn't seems to work. I tried setting it as "when entity swings item", but it just has normal reach. Furthermore, there isn't additional condition set has "when left-click" in "when tool in hand tick", so I was wondering if someone had done any progress at all. 

public class TempoProcedure {

    public static void execute(double x, double y, double z, Entity entity) {

        if (entity == null)

            return;

        if (Math.pow(Math.pow(entity.getX() - x, 2) + Math.pow(entity.getY() - y, 2) + Math.pow(entity.getZ() - z, 2), 0.5) == 6) {

            entity.hurt(DamageSource.GENERIC, 5);

        }

    }

}

Looks like that in code or like that in explanded block :

Active 2 months ago
Joined Dec 2021
Points:
430

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 26
imgur link?
Sat, 08/19/2023 - 03:06

imgur link?