17 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by ashanki#0
um english plz?
Sword swapping in hypixel
you want to patch an issue in hypixel???
No. It's the same bug
In pepper
*paper
whats the bug?
In hypixel its their fancy projectile weapons taking the stat of whatever's in ur hand right
Yes
Lemme send video
Scilan Gaming
YouTube
This bug will change PvP FOREVER
A quick stream explaining a cool bug.A bug known as:Attribute swapping1 tickingsword disablinghit swappingsword swappingthe cooldown trickbreach swappingIt g...
Why does that suddenly become a kenadian vid a few mins in lol
You think this might be related?
Doesn’t seem like it according to the video (at least the start, I haven’t watched it completely)
https://github.com/PaperMC/Paper/issues/11552
GitHub
Swapping items and attacking will (for a split second) make player....
Expected behavior Code Using EntityDamageByEntityEvent: if (attackingPlayer.getAttackCooldown() == 1.0) { damagedPlayer.setFoodLevel(Math.max(damagedPlayer.getFoodLevel() - foodLevelReduction, 0));...
The start is the only important thingy
Yeah that seems like it
yeah so basically heres the thing right
something like this would to my knowledge require either extreme overhauls of how minecraft manages items or alternatively adding a 1 tick delay to item swaps in relation to attacking
(or any other action related to attributes updating)
the problem is theres countless ways an item can have an attribute changed and it would be essentially impossible to track it well
oh or the other option is add checks anywhere that attributes apply to ensure it actually matches with the held items (but not too many places or it might lag stuff out)
which would probably be a pain
im kinda curious just how much this would affect perf, might test it
hm
might need to test that as well
i didnt do the most thorough job with this so the performance impact will def be worse than it needs to be but have fun https://github.com/TrollsterCooleg/PaperTest/releases/tag/patchitemswap
GitHub
Release 1.21.4 Paper - Item Swap Patch · TrollsterCooleg/PaperTest
NO SUPPORT WILL BE GIVEN FOR THIS.
it almost definitely does more checks than it needs to
an ideal ideal solution would be like 20x harder so oh well, it still overall performs fine and the perf isnt actually noticably worse anyways its a tiny difference really
(@Ashank just gonna ping you in case you actually want to use it)
Ty
depending on if im bored enough i may in theory continue updating this if anyone asks for it in here (ping me!) but no guarentees
at least until someone smarter or more patient than me does it a better way so it has a legitimate chance to be merged into paper
unless im not feeling bored enough to continue maintaining it in which case if someone else is desperate to use this low quality fix they can maintain it themselves