Fix location shift in block_break so dropped items aren't placed into adjacent blocks. #1388
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you call
modify_event('drops', <any item array>)
forblock_break
, there's a bit of a 'hack' in place to emulate this sinceBlockBreakEvent
doesn't support rewriting drops natively.Since we offset the location then do a
dropItemNaturally
call, it can sometimes send the item into another block, which causes it to shoot to the surface if they're underground. Not ideal.I've attached links to two gifs. They're a bit large (and might play slow until they download fully). Hopefully it visualizes what happens.
Before: (~13MB) https://dirt.wtf/1ebnnKc8Pne20dm0.gif
After: (~8MB) https://dirt.wtf/VFB66bDgc6zGsRFa.gif