Improve Crop Break Logic
Caltinor opened this issue ยท 2 comments
- Cascading breaks give full xp
- fully grown crops not subject to placed block xp reduction
Add Default Grow and Break Logic to Cascading Crops
Grow Cases
- Sugar Cane
- Bamboo
- Cactus
- Pointed Dripstone
-
GrowingPlantBlock
(kelp, nether vines, cave vines)
Break Cases
- Sugar Cane
- Bamboo
- Cactus
- Chorus Plant
- Pointed Dripstone
- Bush Block
-
GrowingPlantblock
(kelp, nether vines, cave vines)
Implementation Notes
Break actions will be captured through a system of blockpos marking stored in ChunkDataHandler
without persistence. During a break event, blocks belonging to the pmmo:cascading_breakables
tag will leave behind a player object for the block pos corresponding to the broken block. The above break cases will then have mixins to capture when the ServerLevel.destroyBlock
call is made and post a break event using this player.
A custom break call will be added to the API and used in these cases to allow mods to post a break event that uses this directional sensitivity.
So I had to PR a fix into Forge to actually get Sugar Cane to give grow XP. it was apparently an oversight on their part, but nonetheless if you want xp from Sugar Cane growth, you need to update to that version of Forge. I just did the PR and it was merged today, so keep an eye out for that version if you are waiting.