Open MerchantPug opened 1 year ago
I think that the BouncinessMultiplierRegistry
should not be a hardcoded thing now looking back at this.
I'll be rewriting the hardcoded bounciness registry into a new thing for all power classes that allow them to define global data through datapacks.
This PR adds the
apoli:modify_bounciness
power type. This changes the multiplier at which the player's existing velocity is applied upon landing on something.Fields
modifier
/modifiers
(Optional) | These fields should be self explanatory.block_condition
(Optional) | the block condition to test against the landing block to determine whether the player should bounce on a block.take_fall_damage
Boolean (Optional) | Whether the player should take fall damage upon bouncing, defaults to false.stage
(Optional) | Either"pre"
or"post"
. Determines at which stage of the calculation the modifier(s) should apply.Additional Info
This power may be a nightmare for compatibility with bouncy modded blocks, this is because there is no shared bounciness field in the base block class, they instead opted for hardcoded bounciness. I have tried circumventing this by adding a
BouncinessMultiplierRegistry
, which stores multipliers for bounciness for specific classes to use when this power is active.