<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:28:21 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-11654] The text of things fall out of the picture</title>
                <link>https://bugs.mojang.com/browse/MC-11654</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;when you mouse over an item / server status keep the text falls outside image&lt;/p&gt;</description>
                <environment></environment>
        <key id="25819">MC-11654</key>
            <summary>The text of things fall out of the picture</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="grum">[Mojang] Grum (Erik Broes)</assignee>
                                    <reporter username="bug">bug</reporter>
                        <labels>
                    </labels>
                <created>Wed, 13 Mar 2013 15:48:06 +0100</created>
                <updated>Sun, 3 May 2015 06:16:53 +0200</updated>
                            <resolved>Fri, 15 Mar 2013 16:54:57 +0100</resolved>
                                    <version>Minecraft 1.5</version>
                                    <fixVersion>Minecraft 1.5.1</fixVersion>
                                                        <votes>2</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="54079" author="league" created="Sat, 16 Mar 2013 16:34:29 +0100"  >&lt;p&gt;Grum, the bug Kilser!&lt;/p&gt;</comment>
                            <comment id="53593" author="bug" created="Fri, 15 Mar 2013 18:09:53 +0100"  >&lt;p&gt;thanks&lt;/p&gt;</comment>
                            <comment id="53557" author="grum" created="Fri, 15 Mar 2013 16:54:57 +0100"  >&lt;p&gt;Nah its not a bug anymore! KILLSED IT!&lt;/p&gt;</comment>
                            <comment id="52330" author="bug" created="Wed, 13 Mar 2013 18:51:34 +0100"  >&lt;p&gt;is it a bug or not?&lt;/p&gt;</comment>
                            <comment id="52323" author="bugi74" created="Wed, 13 Mar 2013 18:38:05 +0100"  >&lt;p&gt;&lt;b&gt;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;GuiContainer&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;protected&lt;/span&gt; void drawItemStackTooltip(ItemStack par1ItemStack, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; par2, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; par3) {
            ...
            &lt;span class=&quot;code-comment&quot;&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;.guiTop + y + contentHeight + 6 &amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.height) {
&lt;/span&gt;            &lt;span class=&quot;code-comment&quot;&gt;//    y = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.height - contentHeight - &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.guiTop - 6;
&lt;/span&gt;            &lt;span class=&quot;code-comment&quot;&gt;//}
&lt;/span&gt;            x = clampXToView(x, contentWidth, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.guiLeft);
            y = clampYToView(y, contentHeight, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.guiTop);
            ...
    }

    &lt;span class=&quot;code-keyword&quot;&gt;protected&lt;/span&gt; void drawCreativeTabHoveringText(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; tooltipText, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; x, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; y) {
        ...
        &lt;span class=&quot;code-object&quot;&gt;byte&lt;/span&gt; contentHeight = 8;
        &lt;span class=&quot;code-comment&quot;&gt;// ADDED:
&lt;/span&gt;        x = clampXToView(x, contentWidth, 0);
        y = clampYToView(y, contentHeight, 0);
        ...
    }

    &lt;span class=&quot;code-comment&quot;&gt;// ADDED METHODS:
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; clampXToView(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; x, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; textWidth, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; xFix) {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (xFix + x + textWidth + 6 &amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.width) {
            x = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.width - textWidth - xFix - 6;
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; x;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; clampYToView(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; y, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; textHeight, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; yFix) {
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (yFix + y + textHeight + 6 &amp;gt; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.height) {
            y = &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.height - textHeight - yFix - 6;
        }
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; y;
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Tested on 1.4.7 and works. It is a bit naive, as it does not check for the case where the text is too wide to fit in the window, in which case it would be better to let it clip on the right side. Now it clips on the left side, cutting the usually more important text from the start. However, that situation would be really rare, and the code for that case is also easy to add (though I leave that as an exercise for Mojang).&lt;/p&gt;

&lt;p&gt;Note also the variables &apos;xFix&apos; and &apos;yFix&apos;. They are needed because the tooltip methods are called with different coordinate offsets. No idea why, but so it is.&lt;/p&gt;

&lt;p&gt;There might be other GUI elements around that might benefit from the same change...&lt;/p&gt;

&lt;p&gt;(P.S. It is often faster to make the fix than create a well-written feature request, let alone trying to keep it bumped up on the forums &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/tongue.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;</comment>
                            <comment id="52305" author="banana478" created="Wed, 13 Mar 2013 17:53:59 +0100"  >&lt;p&gt;Well, then, I guess it&apos;s a feature request.&lt;/p&gt;</comment>
                            <comment id="52264" author="bugi74" created="Wed, 13 Mar 2013 16:25:49 +0100"  >&lt;p&gt;Actually, this is Minecraft&apos;s fault, as long as the minecraft window is large enough to contain that tooltip at some position.&lt;/p&gt;

&lt;p&gt;The same thing (without the bug) can be seen e.g. with the browser tooltip on the &quot;Views&quot;-button of this JIRA page. Move the browser window to rightmost edge of display and notice how the tooltip is shifted to left to avoid going out of the display. If the window is not far enough to right, the tooltip will happily cross over the window border (since it is rendered by the OS). (These behaviors at least with Chrome on Windows 7; if getting different results, blame the maker of the OS and/or browser).&lt;/p&gt;

&lt;p&gt;Minecraft can not provide tooltips that extend out of its window as easily (if at all), but it could still shift the tooltip to left (when necessary) in order to keep it fully in view.&lt;/p&gt;

&lt;p&gt;(Will this be yet another issue I have to provide the code fix for?)&lt;/p&gt;

&lt;p&gt;Edit: the code already has the proper handling for &lt;em&gt;vertical&lt;/em&gt; case on item stacks, but not for horizontal, and nothing for the inventory tab tooltips.&lt;/p&gt;
</comment>
                            <comment id="52254" author="bug" created="Wed, 13 Mar 2013 15:51:55 +0100"  >&lt;p&gt;oh&lt;/p&gt;</comment>
                            <comment id="52253" author="banana478" created="Wed, 13 Mar 2013 15:51:18 +0100"  >&lt;p&gt;You can either turn down the GUI scale or get a bigger screen. It&apos;s not Minecraft&apos;s fault.&lt;/p&gt;</comment>
                            <comment id="52252" author="banana478" created="Wed, 13 Mar 2013 15:50:34 +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>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Bonfire Testing</name>
                                            <outwardlinks description="testing discovered">
                                        <issuelink>
            <issuekey id="27352">MC-12503</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10103">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="103913">MC-75699</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="24323" name="2013-03-13_15.47.05.png" size="193249" author="bug" created="Wed, 13 Mar 2013 15:48:06 +0100"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 13 Mar 2013 19:16:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10301"><![CDATA[Plausible]]></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|i03jcf:</customfieldvalue>

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