[MC-9686] Right- and left clicking at the same time will cause a block to be placed on top of a block, which then gets removed Created: 12/Feb/13 Updated: 21/Dec/13 Resolved: 11/Nov/13 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Snapshot 13w05b, Snapshot 13w06a, Snapshot 13w09a, Snapshot 13w09b, Minecraft 1.5, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2 |
| Fix Version/s: | Minecraft 1.7.2 |
| Type: | Bug | ||
| Reporter: | DicoTheRedstoner | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Mac OSX Snow Leopard 32bit |
||
| Issue Links: |
|
||||||||||||||||||||
| CHK: | |||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||
| Game Mode: | Creative | ||||||||||||||||||||
| Description |
|
if you stand on a block and have a block in your hand, jumping and then right clicking and left clicking at the same time will cause the block you were standing at to be 'moved' up. The block you were standing on will be deleted and a new block will be placed in the air. This works in any direction |
| Comments |
| Comment by Markku [ 21/Dec/13 ] |
|
For reference: Seems this was "fixed" so that only the left click action (block removing) is done, right click action gets ignored when it happens simultaneously with a left click. (Didn't check the code, just the observed behavior in the client.) |
| Comment by [Mod] Pokechu22 [ 12/Nov/13 ] |
|
Explain to me why this is a bug. |
| Comment by Markku [ 28/Feb/13 ] |
|
Affects 13w09b. |
| Comment by Markku [ 13/Feb/13 ] |
|
It theoretically causes a tiny bit more processing overhead (which btw isn't 'lag') whenever the left mouse click is used, yes. But it should not be any considerable amount. I'll leave the testing and fine-tuning (or figuring out a better solution) for Mojang. For example, the initial call to getMouseOver is inside its own profiling section, so I'd guess Mojang would like to wrap that added call into one, too. The solution I gave is more like proof of concept; proofs the reason for the bug, and that it can be fixed (easily). |
| Comment by DicoTheRedstoner [ 13/Feb/13 ] |
|
Wouldn't this lag more? |
| Comment by Markku [ 13/Feb/13 ] |
|
Reason Now, one could think that the game checks if the block targeted can accept something to be attached to it. Nope. It only check the object being added if it has some objections to being attached to the target block. Apparently normal blocks have no objections of being attached to air. One fix Minecraft.clickMouse(int) private void clickMouse(int button) { ... } else if (this.objectMouseOver.typeOfHit == EnumMovingObjectType.TILE) { int var4 = this.objectMouseOver.blockX; int var5 = this.objectMouseOver.blockY; int var6 = this.objectMouseOver.blockZ; int var7 = this.objectMouseOver.sideHit; if (button == 0) { // LEFT CLICK ON BLOCK this.playerController.clickBlock(var4, var5, var6, this.objectMouseOver.sideHit); this.entityRenderer.getMouseOver(1.0F); // <-- ADDED FOR FIX, REPICKS AIMED BLOCK } else { // RIGHT CLICK ON BLOCK ... } Tested on 1.4.7. The fix makes the deletion of the aimed block (happens first) to also rescan for the new aimed block before applying block placement with the right click. Basically, the block under feet will be replaced with the block in hand. |
| Comment by Kumasasa [ 13/Feb/13 ] |
|
Confirmed. |