<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:30:16 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-12239] command block testfor command does not work with coordinate arguments</title>
                <link>https://bugs.mojang.com/browse/MC-12239</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;When I put &quot;testfor x=7,y=5,z=32&quot; in a command block and hooked it up to a redstone clock so that it would update itself and put a redstone comparitor in front of it...&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What I expected to happen was...:&lt;/b&gt;&lt;br/&gt;
-When I was at coordinates &quot;7 5 32&quot;, the comparitor would turn on, powering the redstone in front of it&lt;br/&gt;
-When I was not at said coordinates, the comparitor would turn off&lt;/p&gt;

&lt;p&gt;&lt;b&gt;What actually happened was...:&lt;/b&gt;&lt;br/&gt;
As soon as the command was entered in the command block, the comparitor turned on, and refused to turn off no matter where i was (including those coordinates)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Steps to Reproduce:&lt;/b&gt;&lt;br/&gt;
1. Place a command block&lt;br/&gt;
2. Place a redstone comparitor facing out from the command block&lt;br/&gt;
3. In the command block, type the following: &quot;testfor @p&lt;span class=&quot;error&quot;&gt;&amp;#91;x=&amp;lt;your x coordinate&amp;gt;,y=&amp;lt;your y coordinate,z=&amp;lt;your z coordinate&amp;gt;&amp;#93;&lt;/span&gt;&quot;&lt;br/&gt;
4. Place a redstone repeater facing out from the comparitor&lt;br/&gt;
5. Place a redstone lamp so that it gets input from the redstone repeater&lt;br/&gt;
6. Hook the command block up to a redstone clock (google how to do this if you don&apos;t know)&lt;/p&gt;

&lt;p&gt;All other commands and testfor arguments work perfectly for me.&lt;/p&gt;

&lt;p&gt;Edit:&lt;br/&gt;
At the input of a commenter, I included a maximum search radius argument (&quot;r=&amp;lt;radius&amp;gt;&quot;). Now the command block acts as if the search radius argument was the only argument, turning on when I am in radius and off when I am out of radius, regardless of coordinates.&lt;/p&gt;</description>
                <environment>Windows 8&lt;br/&gt;
Java Version 7 Update 11</environment>
        <key id="26985">MC-12239</key>
            <summary>command block testfor command does not work with coordinate arguments</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="6">Works As Intended</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="clarinetncleats3">Evan B</reporter>
                        <labels>
                            <label>command_block</label>
                            <label>comparator</label>
                            <label>coordinates</label>
                            <label>redstone</label>
                    </labels>
                <created>Sun, 17 Mar 2013 18:53:26 +0100</created>
                <updated>Fri, 29 Dec 2017 23:13:34 +0100</updated>
                            <resolved>Sun, 17 Mar 2013 18:55:00 +0100</resolved>
                                    <version>Minecraft 1.5</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="222154" author="kingsupernova" created="Tue, 17 Mar 2015 02:43:59 +0100"  >&lt;p&gt;To all you people saying this is still an issue:&lt;/p&gt;

&lt;p&gt;No it&apos;s not. The radius argument defaults to infinity if you don&apos;t input it. So if you type &quot;/testfor @a&lt;span class=&quot;error&quot;&gt;&amp;#91;x=0,y=0,z=0&amp;#93;&lt;/span&gt;&quot;, it will look for all players within a radius of infinity of 0, 0, 0, and it will obviously find all players in the world. If you want to limit the search radius, &lt;b&gt;input a radius argument&lt;/b&gt;. In the future, please actually check the correct syntax for commands before posting a bug report.&lt;/p&gt;</comment>
                            <comment id="216724" author="ethanicus" created="Fri, 23 Jan 2015 00:54:23 +0100"  >&lt;p&gt;Yup, I&apos;m having the same basic issue. Mojang&apos;s gotta&apos; fix this.&lt;/p&gt;</comment>
                            <comment id="117235" author="kurai ookami" created="Sat, 2 Nov 2013 21:24:49 +0100"  >&lt;p&gt;mine was forced onto this and marked as resolved &amp;gt;_&amp;gt; so I&apos;ll probably just make a new one&lt;/p&gt;

&lt;p&gt;Edit: new ticket &lt;a href=&quot;https://bugs.mojang.com/browse/MC-38817&quot; title=&quot;/tell, /tellraw, /tp and /testfor don&amp;#39;t work when using coordinate arguments.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-38817&quot;&gt;&lt;del&gt;MC-38817&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="117175" author="ferdi265" created="Sat, 2 Nov 2013 18:12:57 +0100"  >&lt;p&gt;I suggest you to change the title into something similar to &quot;[Command Block] testfor, tell, tellraw and tp don&apos;t accept coordinate-@ arguments&quot;, but that&apos;s only my thought, so if you think the existing title suits this topic better, go leave it.&lt;/p&gt;

&lt;p&gt;I sure notice this as I receive email-notifications about it, so I thought I re-confirm the issue with 1.7.2&lt;br/&gt;
And there we are, with a (in my thoughts) really important bug that should be fixed, because it really makes adventure-maps suffer.&lt;/p&gt;</comment>
                            <comment id="117172" author="kurai ookami" created="Sat, 2 Nov 2013 17:58:53 +0100"  >&lt;p&gt;thank you  Ferdinand B., I thought no one was going to notice this just because it&apos;s already been written off&lt;/p&gt;</comment>
                            <comment id="117158" author="ferdi265" created="Sat, 2 Nov 2013 16:02:15 +0100"  >&lt;p&gt;confirming that commands /tp and /tell do NOT work with @ statements that make use of the x,y,z or r arguments in Minecraft 1.7.2&lt;br/&gt;
Other arguments work fine though.&lt;/p&gt;

&lt;p&gt;Examples: &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;/tell @p[score_lolz=1] Whisper&lt;br/&gt;
works&lt;/li&gt;
	&lt;li&gt;/tell @p[x=102,y=65,z=-364] Whisper&lt;br/&gt;
doesn&apos;t work (claims to not be able to find player)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="117105" author="kurai ookami" created="Sat, 2 Nov 2013 04:36:43 +0100"  >&lt;p&gt;A screenshot of my location, the command used and the return I get when attempting to use it.&lt;/p&gt;</comment>
                            <comment id="117102" author="kurai ookami" created="Sat, 2 Nov 2013 04:21:34 +0100"  >&lt;p&gt;can someone please take the time to confirm this instead of just writing it off as someone else&apos; syntax errors. This is NOT working as intended.&lt;/p&gt;</comment>
                            <comment id="116920" author="kurai ookami" created="Thu, 31 Oct 2013 21:39:37 +0100"  >&lt;p&gt;please update to include affects versions 1.7.2 and mark it as re-opened&lt;/p&gt;</comment>
                            <comment id="116918" author="kurai ookami" created="Thu, 31 Oct 2013 21:34:58 +0100"  >&lt;p&gt;tested a couple more commands /tell and /testfor are also not responding to location arguments correctly&lt;/p&gt;</comment>
                            <comment id="116821" author="kurai ookami" created="Thu, 31 Oct 2013 02:15:21 +0100"  >&lt;p&gt;it appears I need to correct myself again. it seems that location restricting arguments are simply not working with the /tp command, whether or not it is executed via a command block. Though it is working with other commands like /give and /scoreboard&lt;/p&gt;</comment>
                            <comment id="116802" author="kurai ookami" created="Wed, 30 Oct 2013 23:06:33 +0100"  >&lt;p&gt;Also in the same right I have no idea why my new report was referred to here considering this was for 1.5 and I was reporting for 1.7.2&lt;/p&gt;</comment>
                            <comment id="116801" author="kurai ookami" created="Wed, 30 Oct 2013 23:02:54 +0100"  >&lt;p&gt;can someone update this to affects 1.7.2?&lt;/p&gt;</comment>
                            <comment id="116754" author="kurai ookami" created="Wed, 30 Oct 2013 17:39:17 +0100"  >&lt;p&gt;New development: I moved the command blocks to a new location, didn&apos;t even change the commands in the slightest and now they work.&lt;/p&gt;

&lt;p&gt;Edit: the TP command block still didn&apos;t work&lt;/p&gt;</comment>
                            <comment id="116752" author="kurai ookami" created="Wed, 30 Oct 2013 17:06:58 +0100"  >&lt;p&gt;Just realized I have another couple command blocks with similar code but they do work.....&lt;br/&gt;
effect @a[60,69,4,1,score_MobKills_min=500] 5 3600 3&lt;br/&gt;
scoreboard players remove @a[60,69,4,1,score_MobKills_min=500] MobKills 500&lt;br/&gt;
not sure why one works and the other doesn&apos;t&lt;/p&gt;</comment>
                            <comment id="116663" author="kurai ookami" created="Wed, 30 Oct 2013 03:36:47 +0100"  >&lt;p&gt;I have had similar issues as well but mine was looking for a person to TP for example&lt;br/&gt;
tp @a[70,64,-15,1] 60.5 68 -2.5&lt;br/&gt;
using this as my command it pulled everyone in my game not just everyone in that location, further testing also showed this is not the case when a specific player is called, for example&lt;br/&gt;
tp Kurai_ookami[70,64,-15,1] 60.5 68 -2.5&lt;br/&gt;
only work while within the radius, so it seems @p, @r, and @a are not simply being treated as a player name as they behave differently. Also playing around with different input structures&lt;br/&gt;
tp @a[x=70,y=64,z=-15,r=1] 60.5 68 -2.5&lt;br/&gt;
tp @a[x=70,y=64,z=-15,r=1,rm=0] 60.5 68 -2.5&lt;br/&gt;
tp @a[x=70,y=64,z=-15] 60.5 68 -2.5&lt;br/&gt;
has shown that none of the formats for writing arguments work with the @p, @r and @a calls but do work when referring to a specific player. Including the 3rd which does not list a radius (defaulting to both minimum and maximum radius being 0 A.K.A. the exact location called and nothing more) showing that a radius is NOT required.&lt;/p&gt;

&lt;p&gt;Edit: to be more clear this was actually tested with an effect command, /tp still does not work&lt;/p&gt;</comment>
                            <comment id="65118" author="ferdi265" created="Sun, 5 May 2013 13:09:25 +0200"  >&lt;p&gt;also, you didn&apos;t really give us a real clue what you put into the command block.&lt;/p&gt;

&lt;p&gt;Once you said testfor x=&amp;lt;number&amp;gt; y=&amp;lt;number&amp;gt; z=&amp;lt;number&amp;gt;&lt;br/&gt;
and once you said testfor @px=&amp;lt;number&amp;gt;,y=&amp;lt;number&amp;gt;,z=&amp;lt;number&amp;gt; and in your pic you said @p[x=&amp;lt;number&amp;gt;,y=&amp;lt;number&amp;gt;,z=&amp;lt;number&amp;gt;]&lt;/p&gt;

&lt;p&gt;The way it works is this:&lt;/p&gt;

&lt;p&gt;testfor &amp;lt;playername&amp;gt;&lt;br/&gt;
The @-Notations are treated as playernames&lt;/p&gt;

&lt;p&gt;If you do an @-notation with arguments [x,y,z] then it will search from that location but the radius will still be infinite.&lt;br/&gt;
So @p[3,4,5] will still be on as long as at least one player is online (he is the nearest to 3,4,5)&lt;/p&gt;

&lt;p&gt;In your case, I would either do @p[x,y,z,r], @a[x,y,z,r] or @r[x,y,z,r] to get the disired effect (only triggering if you are in a certain area)&lt;/p&gt;

&lt;p&gt;Example: testfor @a[x=27,y=65,z=-1226,r=3]&lt;br/&gt;
Will test for a player within 3 blocks spherical radius of x=27, y=65 and z=-1226&lt;/p&gt;</comment>
                            <comment id="54637" author="bljat" created="Sun, 17 Mar 2013 19:08:48 +0100"  >&lt;p&gt;Search radius is always required when using specific coordinates.&lt;/p&gt;</comment>
                            <comment id="54635" author="bljat" created="Sun, 17 Mar 2013 19:07:58 +0100"  >&lt;p&gt;Please do not mark issues as private, unless your bug report is a security issue containing information that may compromise your server/client.&lt;/p&gt;</comment>
                            <comment id="54631" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:56:57 +0100"  >&lt;p&gt;Is that necessary? And why is that necessary if I specify the coordinates?&lt;/p&gt;</comment>
                            <comment id="54630" author="bljat" created="Sun, 17 Mar 2013 18:55:00 +0100"  >&lt;p&gt;You haven&apos;t provided a search radius.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="51538">MC-30435</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56693">MC-34979</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="60646">MC-38417</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="63684">MC-40797</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="76015">MC-50183</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="77829">MC-51835</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="82528">MC-56021</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="100905">MC-73005</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="101174">MC-73256</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="47244" name="11-1-13[2334@-5gmt]Bueller.png" size="234201" author="kurai ookami" created="Sat, 2 Nov 2013 04:36:43 +0100"/>
                            <attachment id="25355" name="2013-03-17_13.47.57.png" size="263614" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                            <attachment id="25356" name="2013-03-17_13.48.03.png" size="241789" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                            <attachment id="25357" name="2013-03-17_13.48.06.png" size="239553" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                            <attachment id="25358" name="2013-03-17_13.48.09.png" size="158075" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                            <attachment id="25359" name="2013-03-17_13.50.08.png" size="452064" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                            <attachment id="25360" name="2013-03-17_13.50.13.png" size="346670" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                            <attachment id="25361" name="2013-03-17_13.50.52.png" size="525637" author="clarinetncleats3" created="Sun, 17 Mar 2013 18:53:26 +0100"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Unconfirmed]]></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_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0n03z:</customfieldvalue>

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