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 cactus dropping invalid item #832



Copy link

@XuZhen86 XuZhen86 commented Jan 30, 2018

This pull request mainly tries to fix a bug that the cactus will drop purple block when the internal data is not 0. It also fixes a typo and improves Javadoc.

Observed behavior:
Cactus drops purple block randomly when break, as seen in the screen shot below.
The purple blocks also groups together based on the data value.
This bug occurs more often when the cactus block is on top of a growing cactus.
2018-01-30_10 21 37

Expected behavior:
Cactus should always drop cactus item when break.

Other known issues:

  1. The check style seems to fail on codes related to arrow?
  2. When breaking a 3-blocks tall cactus or sugar cane, the items will drop but disappears right after they touch the floor.
1. Fix cactus drops purple cube if getData() != 0
2. Fix a typo in BlockSugarCane
3. Improve Javadoc for BlockCactus and BlockSugarCane
Copy link
Contributor Author

@XuZhen86 XuZhen86 commented Jan 30, 2018

The title gone wild lol
screen shot 2018-01-30 at 11 12 56 am

* Get the items that will be dropped by digging the block.
* Specially overriten for cactus to remove data from the dropped item.

This comment has been minimized.


mastercoms Jan 30, 2018

Javadocs are not required for overridden methods, I think a comment saying Overridden for cactus to remove data from the dropped item within the method would be sufficient. Same for sugar cane.

@mastercoms mastercoms changed the title Fix cactus randomly drop purple cube Fix cactus dropping invalid item Jan 30, 2018
@mastercoms mastercoms merged commit 91544b7 into GlowstoneMC:dev Jan 30, 2018
2 checks passed
2 checks passed
ci/circleci: build Your tests passed on CircleCI!
license/cla Contributor License Agreement is signed.
Copy link

@mastercoms mastercoms commented Jan 30, 2018

Merged. Thank you for your contribution to Glowstone!

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
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants