Hello, my mob has 100% knockback resistance but is affected by punch enchantment on a bow. Any way to fix this? Thanks.
/summon ....
{Name:generic.knockbackResistance,Base:1.0}
The mob reacts normally and takes no knockback from swords or regular bows, but is moved by "punch" bows. Basically the mob is resistant to all forms of KB except power bows. I've tested in multiple worlds, I can't seem to find the problem. Any form of assistance would be appreciated.
I believe that the NBT you have put in is incorrect. Also, depending on what version you're on, may lead to why the knockback resistance isn't applied on the mob you're spawning.
If I want a mob before 1.16 to have no knockback, for example a pig, I'd use /summon pig ~ ~ ~ {Attributes:[{Name:"generic.knockbackResistance",Base:1f}]}
I'd also be careful on what online generators you use, seeing as some haven't noticed this attribute change either, and make generate you the incorrect code, but if you can go without these online gens, the fair play to you.
Hello, my mob has 100% knockback resistance but is affected by punch enchantment on a bow. Any way to fix this? Thanks.
/summon ....
{Name:generic.knockbackResistance,Base:1.0}
The mob reacts normally and takes no knockback from swords or regular bows, but is moved by "punch" bows. Basically the mob is resistant to all forms of KB except power bows. I've tested in multiple worlds, I can't seem to find the problem. Any form of assistance would be appreciated.
I believe that the NBT you have put in is incorrect. Also, depending on what version you're on, may lead to why the knockback resistance isn't applied on the mob you're spawning.
If I want a mob before 1.16 to have no knockback, for example a pig, I'd use /summon pig ~ ~ ~ {Attributes:[{Name:"generic.knockbackResistance",Base:1f}]}
However, if you're using 1.16, the names of attributes have changed, you can see which have changed in their changelog, here's a link that shows the changes in these names.
https://minecraft.gamepedia.com/Java_Edition_1.16#General_2
1.16 attribute changes will make this code become /summon pig ~ ~ ~ {Attributes:[{Name:"generic.knockback_resistance",Base:1f}]}
I'd also be careful on what online generators you use, seeing as some haven't noticed this attribute change either, and make generate you the incorrect code, but if you can go without these online gens, the fair play to you.