Created
February 28, 2014 00:29
-
-
Save SpaceManiac/9262735 to your computer and use it in GitHub Desktop.
Comment on BlockPlacementHandler regarding double-packet behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The client sends this packet for the following cases: | |
* Right click air: | |
* - Send direction=-1 packet for any non-null item | |
* Right click block: | |
* - Send packet with all values filled | |
* - If client DOES NOT expect a block placement to result: | |
* - Send direction=-1 packet (unless item is null) | |
* | |
* Client will expect a block placement to result from blocks and from | |
* certain items (e.g. sugarcane, sign). We *could* opt to trust the | |
* client on this, but the server's view of events (particularly under | |
* the Bukkit API, or custom ItemTypes) may differ from the client's. | |
* | |
* In order to avoid firing two events for one interact, the two | |
* packet case must be handled here. Care must also be taken that a | |
* right-click air of an expected-place item immediately after is | |
* not considered part of the same action. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment