<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:26:40 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-11142] Placing a Redstone Torch/Block next to a rail junction does not change the rail direction</title>
                <link>https://bugs.mojang.com/browse/MC-11142</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;Thebug&quot;&gt;&lt;/a&gt;The bug&lt;/h3&gt;
&lt;p&gt;Please look at the screenshots first to understand &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;When you place three rails like I did and you place at the bifurcation a redstone torch it will not update the rail, BUT when you place it under the rail it works&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;Codeanalysis&quot;&gt;&lt;/a&gt;Code analysis&lt;/h3&gt;
&lt;p&gt;The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.&lt;/p&gt;

&lt;p&gt;The reason why this happens is very likely a wrong &lt;tt&gt;IBlockState&lt;/tt&gt; being returned by the method &lt;tt&gt;net.minecraft.world.chunk.Chunk.setBlockState(BlockPos, IBlockState)&lt;/tt&gt;. The &lt;tt&gt;IBlockState&lt;/tt&gt; it returns is the one from the block that was replaced. This means the rail is receives a neighbour update with air as source which does not update the rail.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&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;public&lt;/span&gt; IBlockState setBlockState(BlockPos pos, IBlockState state)
{        
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; i = pos.getX() &amp;amp; 15;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; j = pos.getY();
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; k = pos.getZ() &amp;amp; 15;
    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; l = k &amp;lt;&amp;lt; 4 | i;

    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (j &amp;gt;= &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.precipitationHeightMap[l] - 1)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.precipitationHeightMap[l] = -999;
    }

    &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; i1 = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.heightMap[l];
    IBlockState iblockstate = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.getBlockState(pos);

    &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (iblockstate == state)
    {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
    }
    &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
    {
        &lt;span class=&quot;code-comment&quot;&gt;//...
&lt;/span&gt;        
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (extendedblockstorage.get(i, j &amp;amp; 15, k).getBlock() != block)
        {
            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;;
        }
        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
        {
            &lt;span class=&quot;code-comment&quot;&gt;//...
&lt;/span&gt;
            &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.isModified = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
            &lt;span class=&quot;code-comment&quot;&gt;// Replaced &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;; now returns the &lt;span class=&quot;code-keyword&quot;&gt;new&lt;/span&gt; state
&lt;/span&gt;            &lt;span class=&quot;code-comment&quot;&gt;//&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; iblockstate;
&lt;/span&gt;            &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; state;
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If this method is supposed to returns the old state, then methods like &lt;tt&gt;net.minecraft.block.BlockRedstoneTorch.onBlockAdded(World, BlockPos, IBlockState)&lt;/tt&gt; are not working correctly because they pass themself which means at the end the new state is passed.&lt;br/&gt;
Besides that the method &lt;tt&gt;net.minecraft.block.BlockRail.onNeighborChangedInternal(World, BlockPos, IBlockState, Block)&lt;/tt&gt; will still not work correctly. It should test if the new placed block state provides power and if the rail was powered before (it looks like this is currently not tracked).&lt;/p&gt;</description>
                <environment></environment>
        <key id="25247">MC-11142</key>
            <summary>Placing a Redstone Torch/Block next to a rail junction does not change the rail direction</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="marcono1234">Marcono1234</reporter>
                        <labels>
                            <label>rail</label>
                            <label>redstone</label>
                            <label>redstone_block</label>
                            <label>redstone_torch</label>
                    </labels>
                <created>Wed, 6 Mar 2013 15:59:46 +0100</created>
                <updated>Fri, 18 Sep 2020 04:41:30 +0200</updated>
                            <resolved>Mon, 1 Jan 2018 19:30:43 +0100</resolved>
                                    <version>Snapshot 13w10a</version>
                    <version>Snapshot 13w10b</version>
                    <version>Minecraft 1.5.1</version>
                    <version>Minecraft 1.5.2</version>
                    <version>Snapshot 13w18c</version>
                    <version>Snapshot 13w19a</version>
                    <version>Minecraft 1.7.2</version>
                    <version>Minecraft 1.7.4</version>
                    <version>Minecraft 14w08a</version>
                    <version>Minecraft 14w20b</version>
                    <version>Minecraft 14w29b</version>
                    <version>Minecraft 14w30c</version>
                    <version>Minecraft 14w31a</version>
                    <version>Minecraft 1.8-pre1</version>
                    <version>Minecraft 1.8</version>
                    <version>Minecraft 1.8.1-pre3</version>
                    <version>Minecraft 1.8.8</version>
                    <version>Minecraft 15w33c</version>
                    <version>Minecraft 16w04a</version>
                    <version>Minecraft 1.9</version>
                    <version>Minecraft 1.9.1 Pre-Release 1</version>
                    <version>Minecraft 1.9.1 Pre-Release 2</version>
                    <version>Minecraft 1.9.1 Pre-Release 3</version>
                    <version>Minecraft 1.9.4</version>
                    <version>Minecraft 16w21a</version>
                    <version>Minecraft 1.11.2</version>
                    <version>Minecraft 1.12 Pre-Release 6</version>
                    <version>Minecraft 1.12.1</version>
                    <version>Minecraft 1.12.2</version>
                    <version>Minecraft 17w43a</version>
                    <version>Minecraft 17w43b</version>
                                    <fixVersion>Minecraft 17w50a</fixVersion>
                                                        <votes>10</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="736185" author="schortan" created="Sat, 20 Jun 2020 17:56:42 +0200"  >&lt;p&gt;&lt;a href=&quot;https://bugs.mojang.com/secure/ViewProfile.jspa?name=woodensword&quot; class=&quot;user-hover&quot; rel=&quot;woodensword&quot;&gt;woodensword&lt;/a&gt; See &lt;a href=&quot;https://bugs.mojang.com/browse/MC-167257&quot; title=&quot;Powering rail junctions from the side no longer updates the rail immediately&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-167257&quot;&gt;MC-167257&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="722402" author="woodensword" created="Mon, 8 Jun 2020 02:27:14 +0200"  >&lt;p&gt;This is happening in 1.15.2.&lt;/p&gt;</comment>
                            <comment id="611340" author="marcono1234" created="Sat, 7 Dec 2019 15:56:01 +0100"  >&lt;p&gt;@&lt;a href=&quot;https://bugs.mojang.com/secure/ViewProfile.jspa?name=LoekTheKing&quot; class=&quot;user-hover&quot; rel=&quot;LoekTheKing&quot;&gt;LoekTheKing&lt;/a&gt;, you are right, thank you very much. I have cloned the report as &lt;a href=&quot;https://bugs.mojang.com/browse/MC-167257&quot; title=&quot;Powering rail junctions from the side no longer updates the rail immediately&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-167257&quot;&gt;MC-167257&lt;/a&gt; since this report is so old and the bug has been fixed a rather long time ago.&lt;br/&gt;
Do you want to become the reporter of the new report and keep it up to date?&lt;/p&gt;</comment>
                            <comment id="610615" author="loektheking" created="Wed, 4 Dec 2019 15:27:58 +0100"  >&lt;p&gt;This bug has re-appeared in 1.14.4&lt;/p&gt;</comment>
                            <comment id="422592" author="schortan" created="Mon, 11 Dec 2017 19:40:04 +0100"  >&lt;p&gt;Fixed in recent snapshots (tested in 17w50a)&lt;/p&gt;</comment>
                            <comment id="415066" author="schortan" created="Thu, 26 Oct 2017 19:01:21 +0200"  >&lt;p&gt;Can confirm for 17w43a/b&lt;/p&gt;</comment>
                            <comment id="406932" author="suncat" created="Sat, 16 Sep 2017 09:04:13 +0200"  >&lt;p&gt;&lt;a href=&quot;https://bugs.mojang.com/secure/ViewProfile.jspa?name=chyx&quot; class=&quot;user-hover&quot; rel=&quot;chyx&quot;&gt;chyx&lt;/a&gt;, 1.12 is outdated, and a newer version (1.12.1) was already marked as affected&lt;/p&gt;</comment>
                            <comment id="406927" author="chyx" created="Sat, 16 Sep 2017 06:42:53 +0200"  >&lt;p&gt;Still in 1.12&lt;/p&gt;</comment>
                            <comment id="307353" author="suncat" created="Wed, 25 May 2016 19:32:31 +0200"  >&lt;p&gt;Still in 16w21a&lt;/p&gt;</comment>
                            <comment id="295597" author="suncat" created="Sat, 19 Mar 2016 14:16:08 +0100"  >&lt;p&gt;Still in 1.9.1-pre3&lt;/p&gt;</comment>
                            <comment id="242712" author="jktm" created="Fri, 14 Aug 2015 17:52:33 +0200"  >&lt;p&gt;Confirmed for 15w33c&lt;/p&gt;</comment>
                            <comment id="156397" author="garyclosse" created="Thu, 8 May 2014 11:38:12 +0200"  >&lt;p&gt;Confirmed for 14w18b.&lt;/p&gt;</comment>
                            <comment id="63716" author="kuubaku" created="Sat, 27 Apr 2013 12:18:42 +0200"  >&lt;p&gt;Still not fixed as of 1.5.2pre. &lt;br/&gt;
To clarify, if you place a torch adjacent to a t-rail, the t-rail actually can change direction when said torch is controlled by some signal. Placing and removing the torch, however, does not affect t-rail direction even when the circuit that provides that signal exists. In such case t-rail also disregards a zero-tick pulse created on torch placement when the circuit is on.&lt;/p&gt;</comment>
                            <comment id="50370" author="kuubaku" created="Wed, 6 Mar 2013 16:52:48 +0100"  >&lt;p&gt;This has been described previosly in &lt;a href=&quot;https://bugs.mojang.com/browse/MC-8581&quot; title=&quot;Redstone torches don&amp;#39;t affect certain blocks.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-8581&quot;&gt;&lt;del&gt;MC-8581&lt;/del&gt;&lt;/a&gt; (and maybe elsewhere too).&lt;/p&gt;</comment>
                            <comment id="50354" author="bljat" created="Wed, 6 Mar 2013 16:26:51 +0100"  >&lt;p&gt;Confirmed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10101">
                    <name>Cloners</name>
                                                                <inwardlinks description="is cloned by">
                                        <issuelink>
            <issuekey id="276070">MC-167257</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="135879">MC-98185</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="144396">MC-103912</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10103">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="21100">MC-8184</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="23613" name="2013-03-06_15.52.27.png" size="259813" author="marcono1234" created="Wed, 6 Mar 2013 15:59:46 +0100"/>
                            <attachment id="23614" name="2013-03-06_15.52.55.png" size="320712" author="marcono1234" created="Wed, 6 Mar 2013 15:59:46 +0100"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 25 Oct 2014 14:41:00 +0200</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_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|i0gyqn:</customfieldvalue>

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