<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:21:54 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[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</title>
                <link>https://bugs.mojang.com/browse/MC-9686</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;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 &apos;moved&apos; 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&lt;/p&gt;</description>
                <environment>Mac OSX Snow Leopard 32bit</environment>
        <key id="23419">MC-9686</key>
            <summary>Right- and left clicking at the same time will cause a block to be placed on top of a block, which then gets removed</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="dicotheredstoner">DicoTheRedstoner</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Feb 2013 22:43:25 +0100</created>
                <updated>Sat, 21 Dec 2013 13:56:24 +0100</updated>
                            <resolved>Mon, 11 Nov 2013 16:10:41 +0100</resolved>
                                    <version>Snapshot 13w05b</version>
                    <version>Snapshot 13w06a</version>
                    <version>Snapshot 13w09a</version>
                    <version>Snapshot 13w09b</version>
                    <version>Minecraft 1.5</version>
                    <version>Minecraft 1.5.2</version>
                    <version>Minecraft 1.6.1</version>
                    <version>Minecraft 1.6.2</version>
                                    <fixVersion>Minecraft 1.7.2</fixVersion>
                                                        <votes>1</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="126071" author="bugi74" created="Sat, 21 Dec 2013 13:56:24 +0100"  >&lt;p&gt;For reference: Seems this was &quot;fixed&quot; 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&apos;t check the code, just the observed behavior in the client.)&lt;/p&gt;</comment>
                            <comment id="119064" author="pokechu22" created="Wed, 13 Nov 2013 00:30:23 +0100"  >&lt;p&gt;Explain to me why this is a bug.&lt;br/&gt;
It only effects creative, where naturally you should be able to place blocks easier.&lt;br/&gt;
It is highly useful for placing pistons upside down.&lt;br/&gt;
It has no negative aspects, and is impossible to accidently do.&lt;br/&gt;
I used this behavior a ton, and now it is gone.&lt;/p&gt;</comment>
                            <comment id="48432" author="bugi74" created="Thu, 28 Feb 2013 20:33:00 +0100"  >&lt;p&gt;Affects 13w09b.&lt;/p&gt;</comment>
                            <comment id="45618" author="bugi74" created="Wed, 13 Feb 2013 23:57:09 +0100"  >&lt;p&gt;It theoretically causes a tiny bit more processing overhead (which btw isn&apos;t &apos;lag&apos;) whenever the left mouse click is used, yes. But it should not be any considerable amount. I&apos;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&apos;d guess Mojang would like to wrap that added call into one, too.&lt;/p&gt;

&lt;p&gt;The solution I gave is more like proof of concept; proofs the reason for the bug, and that it can be fixed (easily).&lt;/p&gt;</comment>
                            <comment id="45616" author="dicotheredstoner" created="Wed, 13 Feb 2013 23:49:14 +0100"  >&lt;p&gt;Wouldn&apos;t this lag more?&lt;/p&gt;</comment>
                            <comment id="45582" author="bugi74" created="Wed, 13 Feb 2013 22:16:26 +0100"  >&lt;p&gt;&lt;b&gt;Reason&lt;/b&gt;&lt;br/&gt;
The game loop happily handles both buttons in the same round, in the order left then right. The block and coordinates for the block that was aimed are kept the same (that is, it does not seem to recalculate the aim target after handling the first button. Thus, it first does left click (remove block) then immediately after does the right click (adds a block) as if the removed block is still there).&lt;/p&gt;

&lt;p&gt;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 &lt;em&gt;being added&lt;/em&gt; if it has some objections to being attached to the target block. Apparently normal blocks have no objections of being attached to air.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;One fix&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;Minecraft.clickMouse(int)&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; void clickMouse(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; button) {
            ...
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.objectMouseOver.typeOfHit == EnumMovingObjectType.TILE) {
            &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; var4 = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.objectMouseOver.blockX;
            &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; var5 = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.objectMouseOver.blockY;
            &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; var6 = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.objectMouseOver.blockZ;
            &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; var7 = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.objectMouseOver.sideHit;

            &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (button == 0) { &lt;span class=&quot;code-comment&quot;&gt;// LEFT CLICK ON BLOCK
&lt;/span&gt;                &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.playerController.clickBlock(var4, var5, var6, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.objectMouseOver.sideHit);
                &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.entityRenderer.getMouseOver(1.0F);    &lt;span class=&quot;code-comment&quot;&gt;// &amp;lt;-- ADDED FOR FIX, REPICKS AIMED BLOCK
&lt;/span&gt;            } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; { &lt;span class=&quot;code-comment&quot;&gt;// RIGHT CLICK ON BLOCK
&lt;/span&gt;                ...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;</comment>
                            <comment id="45560" author="kumasasa" created="Wed, 13 Feb 2013 21:24:33 +0100"  >&lt;p&gt;Confirmed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="27103">MC-12273</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="37395">MC-18891</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="37609">MC-18983</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="50304">MC-29397</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 13 Feb 2013 21:20:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10303"><![CDATA[Confirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10501" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Game Mode</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10305"><![CDATA[Creative]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_11100" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Linked</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03r9r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>