Nova-Committee / Re-Avaritia

MIT License
17 stars 14 forks source link

[Bug/漏洞] Players without Infinity Boots equipped randomly jump higher #52

Open embermctillhawk opened 6 months ago

embermctillhawk commented 6 months ago

Checks / 检查

Java Version / Java版本

17.0.7

Minecraft Version / Minecraft版本

1.20.4

Avaritia-Reforge Version / Avaritia-Reforge版本

1.3.5.3

Description / 描述

Players without Infinity Boots equipped jump higher every other game tick.

This is because every game tick, committee.nova.mods.avaritia.init.handler.AbilityHandler adds every player without Infinity Boots which is not in the entitiesWithBoots to that HashSet and removes every player without Infinity Boots who is in that HashSet. Therefore this effect happens every other tick.

The jumpBoost event is processed for all players and checks if they are present in that HashSet. Players without Infinity Boots equipped are present in that HashSet every other tick, therefore every player will jump higher every other tick without Infinity Boots.

Players with Infinity Boots equipped do not experience such a bug. No other armor effect seems to trigger without the armor equipped, only the Infinity Boots jump boost every other tick.

To Reproduce / 重现

Do not equip Infinity Boots, and jump on random ticks. Holding jump takes an even number of ticks so you can't hold jump, it has to be random.

Log / 日志

-

Config / 配置

default (fresh instance made exclusively to test)

cnlimiter commented 6 months ago

1.20.4 in plan

DexterHaxxor commented 2 months ago

This issue was bothering me on my world for a whole day and then I found out this issue. Sadly can't have Avaritia installed.