Project MMO

Project MMO

10M Downloads

Blocks with low hardness not giving XP for BREAK

SomewhatDamaged opened this issue ยท 0 comments

commented

Describe the bug
I poked around to work out why things like netherack don't give XP for being mined.

These lines are currently how the code generates the autovalues for block break/place event XP gains.

The problem right now is that if the hardness is below 2, the HARDNESS_MODIFIER being 0.5 and the level being (default) 1, will give a fraction. This will then be turned into a long and thus 0.

We need to either give all these easy-to-break blocks an XP value through json, or adjust that function to give XP for lower hardness values.

Another option is to have a PMMO block tag that specifically changes the Math.min to 1 instead of 0.

Expected behavior
Blocks like netherack give small (but non-zero) XP amounts.

To Reproduce
Steps to reproduce the behavior:

  1. Install mod
  2. Go mining for netherack
  3. Get no XP

Versions:

  • PMMO: Any rework version without a specific netherack data config