Increased weapon attack range?

Started by Pootis_Hurm on

Topic category: General discussion

Last seen on 05:29, 17. Nov 2020
Joined Dec 2019
Points:

User statistics:

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

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

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 13:33, 24. Dec 2021
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

 

Last seen on 22:41, 29. Dec 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 04:41, 13. Feb 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 04:41, 13. Feb 2021
Joined Jan 2021
Points:

User statistics:

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

Also, the procedure should be used for left clicking.

Last seen on 13:35, 29. Mar 2024
Joined Mar 2021
Points:

User statistics:

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

 

Last seen on 14:30, 2. Aug 2023
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 :)

Last seen on 23:57, 3. Feb 2024
Joined Jul 2023
Points:

User statistics:

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

Last seen on 18:38, 28. Mar 2024
Joined Dec 2021
Points:

User statistics:

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

imgur link?