<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:13:15 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-7058] Brewing stand comparator output inconsistent</title>
                <link>https://bugs.mojang.com/browse/MC-7058</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;The comparator output from a brewing stand is inconsistent between the different slots in the stand.&lt;/p&gt;

&lt;p&gt;What I expected to happen was if the top slot in the brewing stand had a full stack of items but the three lower slots were empty, the comparator output would be about a quarter of the full fifteen - say four. This would have been consistent with the comparator output from a chest where, if a third of the slots are full of stacks of items, the output is five.&lt;/p&gt;

&lt;p&gt;What actually happened was the comparator output was fifteen. However, if the top slot is empty but one of the lower slots has a water bottle, the output is only four, as expected.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Steps to Reproduce:&lt;/b&gt;&lt;br/&gt;
1. Place a brewing stand with an adjacent comparator and enough redstone to see the output level.&lt;br/&gt;
2. Put a stack of nether wart (for example) in the top slot of the brewing stand&apos;s GUI.&lt;br/&gt;
3. Check the output level - fifteen.&lt;/p&gt;

&lt;p&gt;This also affected the previous snapshot.&lt;/p&gt;

&lt;p&gt;UPDATE: Having read Dinnerbone&apos;s explanation of the algorithm in &lt;a href=&quot;https://bugs.mojang.com/browse/MC-6165&quot; title=&quot;Comparators cannot determine if a container is empty&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-6165&quot;&gt;&lt;del&gt;MC-6165&lt;/del&gt;&lt;/a&gt;, the problem appears to be that the top slot is assumed to only be able to hold a single item. If four items are placed in the slot it is calculated as being 400% full, giving an average over the four slots of 100% and hence an output level of fifteen. With anything over four items in the top slot, the brewing stand is calculated as over 100% full and the output is capped at fifteen.&lt;/p&gt;

&lt;p&gt;This may be related to &lt;a href=&quot;https://bugs.mojang.com/browse/MC-2034&quot; title=&quot;Brewing stands&amp;#39; input slots do not have normal stacking behavior&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-2034&quot;&gt;&lt;del&gt;MC-2034&lt;/del&gt;&lt;/a&gt; - the top slot does not work as expected when shift-clicking items into the brewing stand.&lt;/p&gt;</description>
                <environment>Ubuntu 12.04 (Linux)</environment>
        <key id="19836">MC-7058</key>
            <summary>Brewing stand comparator output inconsistent</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="jeb">[Mojang] Jeb (Jens Bergensten)</assignee>
                                    <reporter username="phssthpok">Phssthpok Pak</reporter>
                        <labels>
                            <label>brewing</label>
                            <label>redstone-comparator</label>
                    </labels>
                <created>Fri, 11 Jan 2013 12:43:58 +0100</created>
                <updated>Mon, 27 Mar 2017 20:48:08 +0200</updated>
                            <resolved>Fri, 1 Mar 2013 11:40:07 +0100</resolved>
                                    <version>Snapshot 13w02a</version>
                    <version>Snapshot 13w02b</version>
                    <version>Snapshot 13w03a</version>
                    <version>Snapshot 13w04a</version>
                    <version>Snapshot 13w05a</version>
                    <version>Snapshot 13w05b</version>
                    <version>Snapshot 13w06a</version>
                    <version>Snapshot 13w09b</version>
                                    <fixVersion>Snapshot 13w09c</fixVersion>
                                                        <votes>1</votes>
                                    <watches>1</watches>
                                                                            <comments>
                            <comment id="55822" author="workhorse" created="Wed, 20 Mar 2013 16:49:50 +0100"  >&lt;p&gt;Comparisons aren&apos;t that bad on performance.  I would think in some cases having a complex formula is worse.  They could also use a switch statement which would be slightly faster.&lt;/p&gt;

&lt;p&gt;If this actually caused some lag they could rewrite the code to do a bisection search of the table.  Worse case it would have to compare four times.  However, I don&apos;t think the size of the table really warrants it.&lt;/p&gt;</comment>
                            <comment id="55775" author="mindforger" created="Wed, 20 Mar 2013 10:06:47 +0100"  >&lt;p&gt;accessing a table is pretty as fast as making a floatingpoint calculation imho! But more a burden to the memory if not used in a static way. But i must admit that i never tested it for myself i just heared it from my professor years ago XD&lt;/p&gt;</comment>
                            <comment id="55758" author="aldorontk" created="Wed, 20 Mar 2013 07:29:29 +0100"  >&lt;p&gt;I like the idea of using a table to determine the output strength. It would fix the issue and can be applied to all containers. The problem with it is coding it for efficiency. As far as my programming skill get me, I can only come up with a block of if statements to determine the output. We&apos;ll be dealing with a continuous variable, so a pre-rendered array or table can&apos;t be used. So it will have to be checked during run time, every time there is an update. It&apos;ll add at most 16 code routines when a one-off equation will do it faster. Might cause unnecessary lag.&lt;/p&gt;

&lt;p&gt;I&apos;ve just set up MCP on my computer and I&apos;m starting to look at the source code to see if I can gleam some ideas from there. With the 1.5.1 update coming out soon, I don&apos;t think our issue will be addressed. Maybe a mod will come out to fix this.&lt;/p&gt;</comment>
                            <comment id="55462" author="workhorse" created="Tue, 19 Mar 2013 16:39:31 +0100"  >&lt;p&gt;Just a thought.  Instead of using a formula, it may be better to just use a table whenever a comparator is used with a container.  Something like:&lt;/p&gt;

&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;Percent Full&lt;/th&gt;
&lt;th class=&apos;confluenceTh&apos;&gt;RS Output&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(0, 5]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(5, 10]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(10, 20]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(20, 25]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(25, 30]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(30, 40]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(40, 50]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(50, 60]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(60, 70]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(70, 75]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(75, 80]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(80, 90]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(90, 95]&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;(95, 100)&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;100&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;15&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


&lt;p&gt;This way every output change would be meaningful and since 75% would output 10 and above 75% would output 11 it would solve this problem too.&lt;/p&gt;</comment>
                            <comment id="55389" author="aldorontk" created="Tue, 19 Mar 2013 07:54:57 +0100"  >&lt;p&gt;You&apos;re right there, error on my part. Math.ceil would be what the equation in my head was using.&lt;br/&gt;
So, Math.ceil[ ( Number of bottles in bottom slots /3) * ( Weight of Bottom Slots ) + ( Number of items in the top slot /64) * ( 15- Weight of Bottom Slots ) ]&lt;/p&gt;

&lt;p&gt;My previous example had the Weight of Bottom Slots set at 7. Changed the formula a bit to allow for inequality of a brewing stand with just bottles in it and a brewing stand with just a stack of items. Weight of Bottom Slots set at 11 is the closest value to have all slots to have equal weight overall, since 15*3/4 = 11.25. If only we could submit RFEs on this site instead of just bugs. Could post something on the Suggestions Board, but I fear this topic will be drowned out by the abstract requests. An official response would be helpful to know if we&apos;re not wasting our time.&lt;/p&gt;</comment>
                            <comment id="55377" author="workhorse" created="Tue, 19 Mar 2013 06:48:40 +0100"  >&lt;p&gt;Okay, I can respect that.&lt;br/&gt;
Sorry, I just don&apos;t like to when someone says they can think of some reason for something but then they don&apos;t express one.&lt;/p&gt;

&lt;p&gt;I don&apos;t think the formula you gave as an example would work though:&lt;br/&gt;
floor(1 + &lt;span class=&quot;error&quot;&gt;&amp;#91;(3/3) + (1/64)&amp;#93;&lt;/span&gt; * 7) = floor(1 + [(3/3 + (0/64) * 7)&lt;br/&gt;
floor(1 + 7 + 7/64) = floor(1 + 7 + 0)&lt;br/&gt;
floor(8 + 0.109...) = floor(8)&lt;/p&gt;

&lt;p&gt;Maybe use Math.ceil instead of truncate?&lt;/p&gt;</comment>
                            <comment id="55370" author="aldorontk" created="Tue, 19 Mar 2013 04:34:19 +0100"  >&lt;p&gt;The best thing I can think of is having multiple brewing stands with a stack of a particular ingredient in each one. The user would then move the bottles from stand to stand until the potion is complete. Thus using the stands as a storage device that seconds as a brewing step. Not very practical and very intensive, but someone might like it that way.&lt;/p&gt;

&lt;p&gt;I don&apos;t see a full revert of this fix to be the best solution as that will re-introduce 4 items in the top slot to equal full redstone output.&lt;br/&gt;
My best solution would be a middle ground of keeping the brewing stand as is and changing how the comparator treats it as a container. Like before, but different.&lt;/p&gt;

&lt;p&gt;Just trying to come up with solutions that doesn&apos;t change the brewing stand that was introduced more than a year ago. Do that and there will be people coming out of the woodwork to argue for the way it used to work, just like we are doing for the comparator now. The comparator is still new enough to change how it interacts, that is where we should be focusing our attention.&lt;/p&gt;</comment>
                            <comment id="55338" author="workhorse" created="Tue, 19 Mar 2013 02:27:56 +0100"  >&lt;p&gt;&quot;I could see some instances where having a stack of items in the top slot could be used&quot;&lt;/p&gt;

&lt;p&gt;Could you give one example please?&lt;/p&gt;</comment>
                            <comment id="55288" author="aldorontk" created="Tue, 19 Mar 2013 00:16:54 +0100"  >&lt;p&gt;I could see some instances where having a stack of items in the top slot could be used, so I doubt they will change that interaction by limiting the top slot to 1 item like the enchanting table. Would like to see some kind of change to the comparator-brewing stand interaction. Just some way of detecting an item in the top slot or not when there are 3 bottles in the brewing stand.&lt;/p&gt;

&lt;p&gt;The work-around that I&apos;ve developed for my auto-potion-maker detects when the hopper above the brewing stand is empty, then initiate a 25 second delay. Works fine, just needed more redstone circuit components than the pre-fix version.&lt;/p&gt;</comment>
                            <comment id="55140" author="2010dmrb" created="Mon, 18 Mar 2013 19:46:49 +0100"  >&lt;p&gt;This really needs to be reverted. Most creations possible to make using brewingstands and restone comparators need the mechanism that detects if there is a single incredient in the slot or not. &lt;/p&gt;</comment>
                            <comment id="54959" author="openarl" created="Mon, 18 Mar 2013 06:10:31 +0100"  >&lt;p&gt;This really needs to be addressed. I think Preston&apos;s fix would be most ideal since there&apos;s no legitimate reason for placing more than one of an item in the ingredient slot.&lt;/p&gt;

&lt;p&gt;I had built a multi-stand brewing machine during the snapshots, and just returned to it today only to find that this fix broke it completely. The only workaround I can think of would vastly increase the complexity of the control circuits.&lt;/p&gt;</comment>
                            <comment id="54904" author="workhorse" created="Mon, 18 Mar 2013 02:04:03 +0100"  >&lt;p&gt;I think Kevin&apos;s fix would be enough for me to be happy.&lt;br/&gt;
However, I think the correct fix would be to revert this and make it so that brewing stands can only contain a single ingredient.  The fact that Dinnerbone&apos;s algorithm was originally based on the assumption that they could only contain a single ingredient supports this.&lt;/p&gt;</comment>
                            <comment id="54370" author="aldorontk" created="Sun, 17 Mar 2013 04:54:57 +0100"  >&lt;p&gt;I&apos;m going to agree with Frank.&lt;br/&gt;
This fix, while it applies the correct algorithm, makes it impossible to tell when a potion has started brewing or when it has stopped.&lt;br/&gt;
Maybe a special method can be called when a comparator is checking a brewing stand, with it&apos;s own algorithm. Something like:&lt;br/&gt;
signal strength = truncate(1+ &lt;span class=&quot;error&quot;&gt;&amp;#91;(number of items in bottom slots/3) +  (number of items in top slot/64)&amp;#93;&lt;/span&gt;*7 )&lt;/p&gt;

&lt;p&gt;In my equation, the output will be 8 if the brewing stand has only bottles in the bottom slots, 9 when the first item is added to the top, and 15 when it is completely filled. Inversely, 8 if the brewing stand&apos;s top slot has 64 items, 9 with one bottle, 11 with two, 15 when completely filled.&lt;/p&gt;

&lt;p&gt;This would fix the initial bug report as well as the unintended feature from the fix.&lt;/p&gt;</comment>
                            <comment id="52744" author="workhorse" created="Thu, 14 Mar 2013 04:02:27 +0100"  >&lt;p&gt;Please revert this fix.&lt;/p&gt;</comment>
                            <comment id="50980" author="mindforger" created="Fri, 8 Mar 2013 13:34:29 +0100"  >&lt;p&gt;well in my opinion this fix is plain useless, my programmable potionmaker is now completly broken!&lt;br/&gt;
there should be at least a change of ONE redstonelevel in between NOTHING in the top slot and MORE THAN NOTHING! This is a broken fix!&lt;/p&gt;</comment>
                            <comment id="44922" author="crivellicus" created="Sun, 10 Feb 2013 01:20:26 +0100"  >&lt;p&gt;Totally true, was tryng to make a potion making machine but i stumbled on this problem&lt;/p&gt;</comment>
                            <comment id="44256" author="phssthpok" created="Thu, 7 Feb 2013 18:50:44 +0100"  >&lt;p&gt;Nice to see this has been looked at even with zero votes.&lt;/p&gt;</comment>
                            <comment id="43978" author="bljat" created="Wed, 6 Feb 2013 16:58:11 +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="25388">MC-11272</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10103">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="27147">MC-12315</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, 6 Feb 2013 16:57: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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0cjqf:</customfieldvalue>

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