Started by
Pootis_Hurm
on
Topic category: General discussion
Is it possible to make weapons with increased attack ranges? To make it work like a spear or an halberd.
Topic category: General discussion
Is it possible to make weapons with increased attack ranges? To make it work like a spear or an halberd.
I think that these values are hard coded into Minecraft but I’m not sure.
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.
???
I don't recall making a spear
I don't think they are hardcoded or at least forge adds apis to change this since a lot of mods do this.
Oh, and it might be easier to do in the future because of the combat snapshots, they have a new weapon stat called reach.
^ ^ ^ ^ ^ ^
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.
Also, the procedure should be used for left clicking.
Hi,
did you succeed in adding splash damage ? Can you please show me procedure ?
could you possibly add a screenchot of this procedure as i am struggling to find the correct blocks
Thanks :)
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 :
imgur link?