Quark Oddities

Quark Oddities

22M Downloads

[Alpha] Usage Ticker freaks out when you holding a bow or crossbow in creative

LeoBeliik opened this issue ยท 4 comments

commented

it tries to show the arrow that you don't have and it constantly show/hide it

commented

UsageTickerModule.Client#getLogicalStack -> it passes the isProjectileWeapon check, so execution proceeds to player.getProjectile(crossbow) -> returns a new ItemStack(Items.ARROW) in creative and ItemStack.EMPTY otherwise, since getProjectile is also used for determining which arrow to shoot when you actually fire the weapon.

Just a guess but this probably applies to 1.19 as well

commented

no, in 1.19 it just shows an arrow and don't hides it

commented

That entire slot could be disabled in creative all things considered

commented

The first check here is the culprit:

return !(prevStack == currStack) || (currStack.isDamageableItem() && currStack.getDamageValue() != prevStack.getDamageValue()) || currentTotal != pastTotal;

It's an object equality check, the getProjectile specialcase returns a new ItemStack every time so the object equality always fails.