GlowstoneMC / Glowstone-Legacy

An open-source server for the Bukkit Minecraft modding interface
Other
363 stars 122 forks source link

DiggingMessage.FINISH_DIGGING not call #629

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello, DiggingHandler.handle don't call DiggingMessage.FINISH_DIGGING if the speed to break block is ~<0.05, based in this table

CrabeMan.

gdude2002 commented 9 years ago

What are the implications of this?

ghost commented 9 years ago

Edit: The implications are BlockBreakEvent cannot cancel this event and The durability is not calculate.

CrabeMan.

turt2live commented 9 years ago

What am I looking at in that table? All I see is numbers.

bendem commented 9 years ago

@turt2live looks like if you read the titles of the columns, you get a good idea of what these numbers are...

turt2live commented 9 years ago

but the numbers vary well between 0 and, in some cases, 6. What does 0.05 have anything to do with this?

Cmdr3nder commented 9 years ago

I believe I have witnessed what this causes on the client side:

Say you are breaking some LONG_GRASS and that only takes you 1 "hit" to break it. DiggingHandler only ever sees the START_DIGGING message and never the FINISH_DIGGING message for the LONG_GRASS block. This leads to things like item drops and other "block has been broken" actions from taking place.

This also appears to be reproducible with flowers and other instant dig blocks (probably any block that is in the 0.05 seconds to dig group on the table @CrabeMan linked.)

My Tentative Fix: https://github.com/ender4021/Glowstone/commit/7d629ba7c9882daee482077ebe9eaff5a872b100

PaulBGD commented 9 years ago

@ender4021 Feel free to make a PR, fix looks good.

Tonodus commented 9 years ago

This is a duplicate of #384

Cmdr3nder commented 9 years ago

@Tonodus Yes, it is. We should get #541 moving again.

@turt2live Perhaps this would be a good opportunity to close #642 and #629 in favor of #541 and #384? I think #541 is a more robust solution.

turt2live commented 9 years ago

Closing this as a duplicate of #384, #384 will be updated with some of the information presented here for reference.

@ender4021 Both #642 and #541 will be reviewed independently and only then should they be compared.