Sword Blocking

Sword Blocking

39.1k Downloads

I tried but failed: Swordblocking, even if there is no shield

UltraBlackLinux opened this issue ยท 2 comments

commented

Hey, there
I saw this mod, and thought: That's what I need! I hoped it would swordblock, when using an aote on Hypixel skyblock, but I was wrong.
I looked at the (surprisingly small) code, and realised, you need a shield in your offhand (The shield doesn't appear, because it gets reset, everytime you teleport.). So I removed the shield requirement from the SwordBlockingClient and the mixing, but - oof new problem: The isUsingItem thing seems to only work, when holding something in your offhand. I tried to maybe permanently replace the offhanditem by a shield ghost item, but Fabric doesn't seem to allow setting the offhand item.
I shortly had the Idea, to detect, whenever the sword is rightclicked, but the way via creating an Item is dumb, obviously, and there seems to be no way to detect the "Use" button, instead of making a new keybind, and detecting that.
I hope you can show me, what I should have done instead, or just compile something like this for me.
I am sorry, if I am making no sense, and writing complete garbage, but Fabric is badly documented (compared to Bukkit), so learning Fabric is just a Headache.
Thanks for this mod xD

commented
commented

Well, you could maybe try this mod: https://www.curseforge.com/minecraft/mc-mods/sword-parry-fabric

Yeah, I saw that, I just hoped this mod would do a better job ;)