Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dead bush drops nothing #833

Merged
merged 3 commits into from Jan 30, 2018

Conversation

@XuZhen86
Copy link
Contributor

@XuZhen86 XuZhen86 commented Jan 30, 2018

This pull request tries to fix the bug that dead bush drops nothing when breaks.

Observed behavior:
Dead bush drops nothing when breaks.

Expected behavior:

Dead bushes drop 0–2 sticks when broken without shears. When shears are used, a dead bush will drop itself. If the block below the dead bush is removed, the bush will simply disappear without dropping anything. Dead Bush

Solution:
Rewrite the getDrops() in BlockDeadBush.
Returns nothing when tool == null
Returns the dead bush when tool is a shear, otherwise return 0-2 sticks.

@mastercoms mastercoms merged commit 2fe0d8b into GlowstoneMC:dev Jan 30, 2018
2 checks passed
2 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
@mastercoms
Copy link
Member

@mastercoms mastercoms commented Jan 30, 2018

Thanks for your contribution to Glowstone!

@mastercoms
Copy link
Member

@mastercoms mastercoms commented Jan 30, 2018

Sorry, I missed your question about a tool null check. Items should be checked if they are empty, using InventoryUtil.

aramperes added a commit that referenced this pull request Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants