- adds `/test_lidded_new <blockpos> query` to get the api's view of the block
- adds `/test_lidded_new <blockpos> set <lidmode>` to change it.
- adds `/test_lidded_old <blockpos> <is_open | close | toggle>` to use the implementation of the old api on top of the new api.
- adds `LiddedTestListener` to test `PlayerLiddedOpenEvent`, which makes any lidded blocks open quietly (ie cancel the event), if done while holding any wool in your main hand.
since it's not the easiest thing to test in-game without some api consumer/activator
a seconds player might be useful to inspect state while it is open/closed with multiple people.
Prevent division by zero in Player#applyMending by simply using zero
instead if the divider itself is zero.
This matches vanilla behaviour in the sense that
ExperienceOrb#repairPlayerItems, which this logic is lifted from, does
pass zero to the enchantment helper and runs its first iteration on
repairing. Vanilla is not affected as the computation failing with zero
is used to compute the leftover exp value, which is not needed if zero
itself is passed in.
As the paper impl however exposes said value to the initial event, our
code needs to account for the zero division.
The existing logic in LivingEntity#checkTotemDeathProtection completes
by checking whether the death protection component is null or not.
In cases where the event was cancelled, the component needs to be nulled
out to prevent the method from returning true, causing the player to
properly die.
An incorrectly updated hunk attempted to remove the MobEffectInstance
from the active effect map instead of the Holder<MobEffect> as the
parameter name was changed from holder to effect during hardfork.
This will cause Gradle to throw a selection error when for example paper-api and spigot-api are on the classpath. Users will need to add selection rules or excludes for certain transitive deps to solve this rather than build with a broken classpath.