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

Merged
merged 2 commits into from Jan 30, 2018

Conversation

Projects
None yet
2 participants
@XuZhen86
Contributor

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.
Fix cactus randomly drop purple cube
1. Fix cactus drops purple cube if getData() != 0
2. Fix a typo in BlockSugarCane
3. Improve Javadoc for BlockCactus and BlockSugarCane
@XuZhen86

This comment has been minimized.

Contributor

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

mastercoms Jan 30, 2018

Member

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 from Fix cactus randomly drop purple cube to Fix cactus dropping invalid item Jan 30, 2018

@mastercoms mastercoms merged commit 91544b7 into GlowstoneMC:dev Jan 30, 2018

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
@mastercoms

This comment has been minimized.

Member

mastercoms commented Jan 30, 2018

Merged. Thank you for your contribution to Glowstone!

momothereal 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