{
    "version": "https://jsonfeed.org/version/1",
    "title": "Ash's Workshop Debrief Blog",
    "home_page_url": "https://blog.ashwork.net/minecraft",
    "description": "Ash's Workshop Debrief Blog",
    "items": [
        {
            "id": "https://blog.ashwork.net/minecraft/2026/06/07/obfuscation-addition",
            "content_html": "<p>Large language models like to lie, a lot.</p>\n<p>I don't try to ask it tricky questions. If anything, I want to eventually integrate large language models into my workflow, well, once they stop hallucinating on any problem outside their dataset. It doesn't matter how good a word predictor is if it can't admit that it doesn't know the answer.</p>\n<p>For example, when was the Minecraft source code first obfuscated?</p>\n<p>We know for a fact that the codebase hasn't been obfuscated since it's inception, especially with the recently popularity spike of people making mods for <a href=\"https://minecraft.wiki/w/Java_Edition_pre-Classic_rd-132211\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\"><code>rd-132211</code></a>. It's also not an easy question given the number of versions that we don't have archives for (according to the <a href=\"https://minecraft.wiki/w/Java_Edition_version_history\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Minecraft wiki</a>). So I threw the question over to Gemini:</p>\n<p>'When was Minecraft first obfuscated?'</p>\n<blockquote>\n<p>\"Minecraft: Java Edition was first obfuscated alongside its initial public release in 2009. To protect their proprietary code, Mojang used scrambled variable and class names, a practice that continued for over a decade.\"</p>\n</blockquote>\n<p>...well, that's not true. Though, Gemini could be assuming only releases from 1.0 onwards So let's rephrase the question.</p>\n<p>'What was the first version of Minecraft (any build) that was obfuscated?'</p>\n<blockquote>\n<p>\"The first obfuscated build (2009): The very initial pre-Classic and Classic versions (like <code>rd-131655</code>) were obfuscated with ProGuard.\"</p>\n</blockquote>\n<p>...that's even worse. We already know the next version wasn't obfuscated, so what's the likelihood that a prior one, a version with no archive, was? Maybe I phrased the question wrong. Let's try once more:</p>\n<p>'Including all pre-release builds, when was Minecraft first obfuscated?'</p>\n<blockquote>\n<p>\"Minecraft’s Java code was first scrambled (obfuscated) with ProGuard in the pre-Classic version 0.0.15a in May 2009. Mojang applied this code scrambling to its very earliest multiplayer tests to protect proprietary algorithms and prevent hacked clients.\"</p>\n</blockquote>\n<p>Well now, that seems a lot more reasonable, and only after three attempts!</p>\n<p>But is it true?</p>\n<p>Well, if we track down the source, it leads to a single comment from <a href=\"https://www.reddit.com/r/Minecraft/comments/18i7ybi/comment/keam8os/\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">a reddit post by 'iProgramMC' on December 21st, 2023</a>.</p>\n<blockquote>\n<p>\"I mentioned this in several replies to comments. I believe that the original reason for obfuscation was to try to prevent the creation of hacked clients and client-based cheats. You see, Classic builds before 0.0.15a (when the first multiplayer tests were being performed), are not obfuscated at all - you can throw them into any Java decompiler and they will show it all; this leads me to believe that's the original reason. It probably has changed over time.\"</p>\n</blockquote>\n<p>I couldn't really find any proof to this claim, but on its face, it seems reasonable. However, I can do one better.</p>\n<p>Let's verify it!</p>\n<p>Modifying the previous gradle buildscript once again:</p>\n<div class=\"expressive-code\"><style>.expressive-code{font-family:var(--ec-uiFontFml);font-size:var(--ec-uiFontSize);font-weight:var(--ec-uiFontWg);line-height:var(--ec-uiLineHt);text-size-adjust:none;-webkit-text-size-adjust:none}.expressive-code *:not(:is(svg, svg *)){all:revert;box-sizing:border-box}.expressive-code pre{display:flex;margin:0;padding:0;border:var(--ec-brdWd) solid var(--ec-brdCol);border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));background:var(--ec-codeBg)}.expressive-code pre:focus-visible{outline:3px solid var(--ec-focusBrd);outline-offset:-3px}.expressive-code pre > code{all:unset;display:block;flex:1 0 100%;padding:var(--ec-codePadBlk) 0;color:var(--ec-codeFg);font-family:var(--ec-codeFontFml);font-size:var(--ec-codeFontSize);font-weight:var(--ec-codeFontWg);line-height:var(--ec-codeLineHt)}.expressive-code pre{overflow-x:auto}.expressive-code pre.wrap .ec-line .code{white-space:pre-wrap;overflow-wrap:break-word;min-width:min(20ch, var(--ecMaxLine, 20ch))}.expressive-code pre.wrap .ec-line .code span.indent{white-space:pre}.expressive-code pre::-webkit-scrollbar,.expressive-code pre::-webkit-scrollbar-track{background-color:inherit;border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));border-top-left-radius:0;border-top-right-radius:0}.expressive-code pre::-webkit-scrollbar-thumb{background-color:var(--ec-sbThumbCol);border:4px solid transparent;background-clip:content-box;border-radius:10px}.expressive-code pre::-webkit-scrollbar-thumb:hover{background-color:var(--ec-sbThumbHoverCol)}.expressive-code .ec-line{direction:ltr;unicode-bidi:isolate;display:grid;grid-template-areas:'gutter code';grid-template-columns:auto 1fr;position:relative}.expressive-code .ec-line .gutter{grid-area:gutter;color:var(--ec-gtrFg)}.expressive-code .ec-line .gutter > *{pointer-events:none;user-select:none;-webkit-user-select:none}.expressive-code .ec-line .gutter ~ .code{--ecLineBrdCol:var(--ec-gtrBrdCol)}.expressive-code .ec-line.highlight .gutter{color:var(--ec-gtrHlFg)}.expressive-code .ec-line .code{grid-area:code;position:relative;box-sizing:content-box;padding-inline-start:calc(var(--ecIndent, 0ch) + var(--ec-codePadInl) - var(--ecGtrBrdWd));padding-inline-end:var(--ec-codePadInl);text-indent:calc(var(--ecIndent, 0ch) * -1)}.expressive-code .ec-line .code::before,.expressive-code .ec-line .code::after,.expressive-code .ec-line .code :where(*){text-indent:0}.expressive-code .ec-line .code{--ecGtrBrdWd:var(--ec-gtrBrdWd);border-inline-start:var(--ecGtrBrdWd) solid var(--ecLineBrdCol, transparent)}.expressive-code .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.expressive-code .ec-line.mark{--tmLineBgCol:var(--ec-tm-markBg)}.expressive-code .ec-line.mark .code{--ecLineBrdCol:var(--ec-tm-markBrdCol)}.expressive-code .ec-line.ins{--tmLineBgCol:var(--ec-tm-insBg);--tmLabel:var(--ec-tm-insDiffIndContent)}.expressive-code .ec-line.ins .code{--ecLineBrdCol:var(--ec-tm-insBrdCol)}.expressive-code .ec-line.ins .code::before{color:var(--ec-tm-insDiffIndCol)}.expressive-code .ec-line.del{--tmLineBgCol:var(--ec-tm-delBg);--tmLabel:var(--ec-tm-delDiffIndContent)}.expressive-code .ec-line.del .code{--ecLineBrdCol:var(--ec-tm-delBrdCol)}.expressive-code .ec-line.del .code::before{color:var(--ec-tm-delDiffIndCol)}.expressive-code .ec-line.mark,.expressive-code .ec-line.ins,.expressive-code .ec-line.del{background:var(--tmLineBgCol)}.expressive-code .ec-line.mark .code,.expressive-code .ec-line.ins .code,.expressive-code .ec-line.del .code{--ecGtrBrdWd:var(--ec-tm-lineMarkerAccentWd)}.expressive-code .ec-line.mark .code::before,.expressive-code .ec-line.ins .code::before,.expressive-code .ec-line.del .code::before{display:block;position:absolute;left:0;box-sizing:border-box;content:var(--tmLabel, ' ');padding-inline-start:var(--ec-tm-lineDiffIndMargLeft);text-align:center;white-space:pre}.expressive-code .ec-line.mark.tm-label .code::before,.expressive-code .ec-line.ins.tm-label .code::before,.expressive-code .ec-line.del.tm-label .code::before{background:var(--ecLineBrdCol);padding:0 calc(var(--ec-tm-lineMarkerLabelPadInl) + var(--ec-tm-lineMarkerAccentWd)) 0 var(--ec-tm-lineMarkerLabelPadInl);color:var(--ec-tm-lineMarkerLabelCol)}.expressive-code .ec-line mark{--tmInlineBgCol:var(--ec-tm-markBg);--tmInlineBrdCol:var(--ec-tm-markBrdCol)}.expressive-code .ec-line ins{--tmInlineBgCol:var(--ec-tm-insBg);--tmInlineBrdCol:var(--ec-tm-insBrdCol)}.expressive-code .ec-line del{--tmInlineBgCol:var(--ec-tm-delBg);--tmInlineBrdCol:var(--ec-tm-delBrdCol)}.expressive-code .ec-line mark,.expressive-code .ec-line ins,.expressive-code .ec-line del{all:unset;display:inline-block;position:relative;--tmBrdL:var(--ec-tm-inlMarkerBrdWd);--tmBrdR:var(--ec-tm-inlMarkerBrdWd);--tmRadL:var(--ec-tm-inlMarkerBrdRad);--tmRadR:var(--ec-tm-inlMarkerBrdRad);margin-inline:0.025rem;padding-inline:var(--ec-tm-inlMarkerPad);border-radius:var(--tmRadL) var(--tmRadR) var(--tmRadR) var(--tmRadL);background:var(--tmInlineBgCol);background-clip:padding-box}.expressive-code .ec-line mark.open-start,.expressive-code .ec-line ins.open-start,.expressive-code .ec-line del.open-start{margin-inline-start:0;padding-inline-start:0;--tmBrdL:0px;--tmRadL:0}.expressive-code .ec-line mark.open-end,.expressive-code .ec-line ins.open-end,.expressive-code .ec-line del.open-end{margin-inline-end:0;padding-inline-end:0;--tmBrdR:0px;--tmRadR:0}.expressive-code .ec-line mark::before,.expressive-code .ec-line ins::before,.expressive-code .ec-line del::before{content:'';position:absolute;pointer-events:none;display:inline-block;inset:0;border-radius:var(--tmRadL) var(--tmRadR) var(--tmRadR) var(--tmRadL);border:var(--ec-tm-inlMarkerBrdWd) solid var(--tmInlineBrdCol);border-inline-width:var(--tmBrdL) var(--tmBrdR)}.expressive-code .frame{all:unset;position:relative;display:block;--header-border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));--tab-border-radius:calc(var(--ec-frm-edTabBrdRad) + var(--ec-brdWd));--button-spacing:0.4rem;--code-background:var(--ec-frm-edBg);border-radius:var(--header-border-radius);box-shadow:var(--ec-frm-frameBoxShdCssVal)}.expressive-code .frame .header{display:none;z-index:1;position:relative;border-radius:var(--header-border-radius) var(--header-border-radius) 0 0}.expressive-code .frame.has-title pre,.expressive-code .frame.has-title code,.expressive-code .frame.is-terminal pre,.expressive-code .frame.is-terminal code{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.expressive-code .frame .title:empty:before{content:'\\a0'}.expressive-code .frame.has-title:not(.is-terminal){--button-spacing:calc(1.9rem + 2 * (var(--ec-uiPadBlk) + var(--ec-frm-edActTabIndHt)))}.expressive-code .frame.has-title:not(.is-terminal) .title{position:relative;color:var(--ec-frm-edActTabFg);background:var(--ec-frm-edActTabBg);background-clip:padding-box;margin-block-start:var(--ec-frm-edTabsMargBlkStart);padding:calc(var(--ec-uiPadBlk) + var(--ec-frm-edActTabIndHt)) var(--ec-uiPadInl);border:var(--ec-brdWd) solid var(--ec-frm-edActTabBrdCol);border-radius:var(--tab-border-radius) var(--tab-border-radius) 0 0;border-bottom:none;overflow:hidden}.expressive-code .frame.has-title:not(.is-terminal) .title::after{content:'';position:absolute;pointer-events:none;inset:0;border-top:var(--ec-frm-edActTabIndHt) solid var(--ec-frm-edActTabIndTopCol);border-bottom:var(--ec-frm-edActTabIndHt) solid var(--ec-frm-edActTabIndBtmCol)}.expressive-code .frame.has-title:not(.is-terminal) .header{display:flex;background:linear-gradient(to top, var(--ec-frm-edTabBarBrdBtmCol) var(--ec-brdWd), transparent var(--ec-brdWd)),linear-gradient(var(--ec-frm-edTabBarBg), var(--ec-frm-edTabBarBg));background-repeat:no-repeat;padding-inline-start:var(--ec-frm-edTabsMargInlStart)}.expressive-code .frame.has-title:not(.is-terminal) .header::before{content:'';position:absolute;pointer-events:none;inset:0;border:var(--ec-brdWd) solid var(--ec-frm-edTabBarBrdCol);border-radius:inherit;border-bottom:none}.expressive-code .frame.is-terminal{--button-spacing:calc(1.9rem + var(--ec-brdWd) + 2 * var(--ec-uiPadBlk));--code-background:var(--ec-frm-trmBg)}.expressive-code .frame.is-terminal .header{display:flex;align-items:center;justify-content:center;padding-block:var(--ec-uiPadBlk);padding-block-end:calc(var(--ec-uiPadBlk) + var(--ec-brdWd));position:relative;font-weight:500;letter-spacing:0.025ch;color:var(--ec-frm-trmTtbFg);background:var(--ec-frm-trmTtbBg);border:var(--ec-brdWd) solid var(--ec-brdCol);border-bottom:none}.expressive-code .frame.is-terminal .header::before{content:'';position:absolute;pointer-events:none;left:var(--ec-uiPadInl);width:2.1rem;height:0.56rem;line-height:0;background-color:var(--ec-frm-trmTtbDotsFg);opacity:var(--ec-frm-trmTtbDotsOpa);-webkit-mask-image:var(--ec-frm-trmIcon);-webkit-mask-repeat:no-repeat;mask-image:var(--ec-frm-trmIcon);mask-repeat:no-repeat}.expressive-code .frame.is-terminal .header::after{content:'';position:absolute;pointer-events:none;inset:0;border-bottom:var(--ec-brdWd) solid var(--ec-frm-trmTtbBrdBtmCol)}.expressive-code .frame pre{background:var(--code-background)}.expressive-code .copy{display:flex;gap:0.25rem;flex-direction:row;position:absolute;inset-block-start:calc(var(--ec-brdWd) + var(--button-spacing));inset-inline-end:calc(var(--ec-brdWd) + var(--ec-uiPadInl) / 2)}@media (scripting: none){.expressive-code .copy{display:none}}.expressive-code .copy{direction:ltr;unicode-bidi:isolate}.expressive-code .copy button{position:relative;align-self:flex-end;margin:0;padding:0;border:none;border-radius:0.2rem;z-index:1;cursor:pointer;transition-property:opacity, background, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94);width:2.5rem;height:2.5rem;background:var(--code-background);opacity:0.75}.expressive-code .copy button div{position:absolute;inset:0;border-radius:inherit;background:var(--ec-frm-inlBtnBg);opacity:var(--ec-frm-inlBtnBgIdleOpa);transition-property:inherit;transition-duration:inherit;transition-timing-function:inherit}.expressive-code .copy button::before{content:'';position:absolute;pointer-events:none;inset:0;border-radius:inherit;border:var(--ec-brdWd) solid var(--ec-frm-inlBtnBrd);opacity:var(--ec-frm-inlBtnBrdOpa)}.expressive-code .copy button::after{content:'';position:absolute;pointer-events:none;inset:0;background-color:var(--ec-frm-inlBtnFg);-webkit-mask-image:var(--ec-frm-copyIcon);-webkit-mask-repeat:no-repeat;mask-image:var(--ec-frm-copyIcon);mask-repeat:no-repeat;margin:0.475rem;line-height:0}.expressive-code .copy button:hover,.expressive-code .copy button:focus:focus-visible{opacity:1}.expressive-code .copy button:hover div,.expressive-code .copy button:focus:focus-visible div{opacity:var(--ec-frm-inlBtnBgHoverOrFocusOpa)}.expressive-code .copy button:active{opacity:1}.expressive-code .copy button:active div{opacity:var(--ec-frm-inlBtnBgActOpa)}.expressive-code .copy .feedback{--tooltip-arrow-size:0.35rem;--tooltip-bg:var(--ec-frm-tooltipSuccessBg);color:var(--ec-frm-tooltipSuccessFg);pointer-events:none;user-select:none;-webkit-user-select:none;position:relative;align-self:center;background-color:var(--tooltip-bg);z-index:99;padding:0.125rem 0.75rem;border-radius:0.2rem;margin-inline-end:var(--tooltip-arrow-size);opacity:0;transition-property:opacity, transform;transition-duration:0.2s;transition-timing-function:ease-in-out;transform:translate3d(0, 0.25rem, 0)}.expressive-code .copy .feedback::after{content:'';position:absolute;pointer-events:none;top:calc(50% - var(--tooltip-arrow-size));inset-inline-end:calc(-2 * (var(--tooltip-arrow-size) - 0.5px));border:var(--tooltip-arrow-size) solid transparent;border-inline-start-color:var(--tooltip-bg)}.expressive-code .copy .feedback.show{opacity:1;transform:translate3d(0, 0, 0)}@media (hover: hover){.expressive-code{}.expressive-code .copy button{opacity:0;width:2rem;height:2rem}.expressive-code .frame:hover .copy button:not(:hover),.expressive-code .frame:focus-within :focus-visible ~ .copy button:not(:hover),.expressive-code .frame .copy .feedback.show ~ button:not(:hover){opacity:0.75}}.expressive-code :nth-child(1 of .ec-line) .code{padding-inline-end:calc(2rem + var(--ec-codePadInl))}:root,:root:not([data-theme='github-dark']) .expressive-code[data-theme='github-dark']{--ec-brdRad:0.3rem;--ec-brdWd:1.5px;--ec-brdCol:#1b1f23;--ec-codeFontFml:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;--ec-codeFontSize:0.85rem;--ec-codeFontWg:400;--ec-codeLineHt:1.65;--ec-codePadBlk:1rem;--ec-codePadInl:1.35rem;--ec-codeBg:#24292e;--ec-codeFg:#e1e4e8;--ec-codeSelBg:#3392ff44;--ec-gtrFg:#727980;--ec-gtrBrdCol:#72798033;--ec-gtrBrdWd:1.5px;--ec-gtrHlFg:#e1e4e896;--ec-uiFontFml:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';--ec-uiFontSize:0.9rem;--ec-uiFontWg:400;--ec-uiLineHt:1.65;--ec-uiPadBlk:0.25rem;--ec-uiPadInl:1rem;--ec-uiSelBg:#39414a;--ec-uiSelFg:#e1e4e8;--ec-focusBrd:#005cc5;--ec-sbThumbCol:#6a737d33;--ec-sbThumbHoverCol:#6a737dd1;--ec-tm-lineMarkerAccentMarg:0rem;--ec-tm-lineMarkerAccentWd:0.15rem;--ec-tm-lineMarkerLabelPadInl:0.2rem;--ec-tm-lineMarkerLabelCol:white;--ec-tm-lineDiffIndMargLeft:0.3rem;--ec-tm-inlMarkerBrdWd:1.5px;--ec-tm-inlMarkerBrdRad:0.2rem;--ec-tm-inlMarkerPad:0.15rem;--ec-tm-insDiffIndContent:'+';--ec-tm-delDiffIndContent:'-';--ec-tm-markBg:#264a8980;--ec-tm-markBrdCol:#5570b3d0;--ec-tm-insBg:#26561c80;--ec-tm-insBrdCol:#4e7e41d0;--ec-tm-insDiffIndCol:#7eb070d0;--ec-tm-delBg:#81322b80;--ec-tm-delBrdCol:#ae594fd0;--ec-tm-delDiffIndCol:#e68a7ed0;--ec-frm-shdCol:#0000005b;--ec-frm-frameBoxShdCssVal:0.1rem 0.1rem 0.2rem #0000005b;--ec-frm-edActTabBg:#24292e;--ec-frm-edActTabFg:#e1e4e8;--ec-frm-edActTabBrdCol:transparent;--ec-frm-edActTabIndHt:1.5px;--ec-frm-edActTabIndTopCol:#f9826c;--ec-frm-edActTabIndBtmCol:#24292e;--ec-frm-edTabsMargInlStart:0;--ec-frm-edTabsMargBlkStart:0;--ec-frm-edTabBrdRad:0.3rem;--ec-frm-edTabBarBg:#1f2428;--ec-frm-edTabBarBrdCol:#1b1f23;--ec-frm-edTabBarBrdBtmCol:#1b1f23;--ec-frm-edBg:#24292e;--ec-frm-trmTtbFg:#e1e4e8;--ec-frm-trmTtbDotsFg:#e1e4e8;--ec-frm-trmTtbDotsOpa:0.15;--ec-frm-trmTtbBg:#24292e;--ec-frm-trmTtbBrdBtmCol:#1b1f23;--ec-frm-trmBg:#1f2428;--ec-frm-inlBtnFg:#e1e4e8;--ec-frm-inlBtnBg:#e1e4e8;--ec-frm-inlBtnBgIdleOpa:0;--ec-frm-inlBtnBgHoverOrFocusOpa:0.2;--ec-frm-inlBtnBgActOpa:0.3;--ec-frm-inlBtnBrd:#e1e4e8;--ec-frm-inlBtnBrdOpa:0.4;--ec-frm-tooltipSuccessBg:#228739;--ec-frm-tooltipSuccessFg:white;--ec-frm-copyIcon:url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.75'%3E%3Cpath%20d%3D'M3%2019a2%202%200%200%201-1-2V2a2%202%200%200%201%201-1h13a2%202%200%200%201%202%201'%2F%3E%3Crect%20x%3D'6'%20y%3D'5'%20width%3D'16'%20height%3D'18'%20rx%3D'1.5'%20ry%3D'1.5'%2F%3E%3C%2Fsvg%3E\");--ec-frm-trmIcon:url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2060%2016'%20preserveAspectRatio%3D'xMidYMid%20meet'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'30'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'52'%20cy%3D'8'%20r%3D'8'%2F%3E%3C%2Fsvg%3E\")}.expressive-code .ec-line :where(span[style^='--']:not([class])),:root:not([data-theme='github-dark']) .expressive-code[data-theme='github-dark'] .ec-line :where(span[style^='--']:not([class])){color:var(--0, inherit);background-color:var(--0bg, transparent);font-style:var(--0fs, inherit);font-weight:var(--0fw, inherit);text-decoration:var(--0td, inherit)}@media (prefers-color-scheme: light){:root:not([data-theme='github-dark']){--ec-brdCol:#e1e4e8;--ec-codeBg:#fff;--ec-codeFg:#24292e;--ec-codeSelBg:#0366d625;--ec-gtrFg:#1b1f2381;--ec-gtrBrdCol:#1b1f2333;--ec-gtrHlFg:#24292eab;--ec-uiSelBg:#e2e5e9;--ec-uiSelFg:#2f363d;--ec-focusBrd:#2188ff;--ec-sbThumbCol:#959da533;--ec-sbThumbHoverCol:#959da5eb;--ec-tm-markBg:#9fb6ff80;--ec-tm-insBg:#94c68480;--ec-tm-insDiffIndCol:#3a692fd0;--ec-tm-delBg:#fea09280;--ec-tm-delDiffIndCol:#97453dd0;--ec-frm-shdCol:#00000028;--ec-frm-frameBoxShdCssVal:0.1rem 0.1rem 0.2rem #00000028;--ec-frm-edActTabBg:#fff;--ec-frm-edActTabFg:#2f363d;--ec-frm-edActTabIndBtmCol:#fff;--ec-frm-edTabBarBg:#f6f8fa;--ec-frm-edTabBarBrdCol:#e1e4e8;--ec-frm-edTabBarBrdBtmCol:#e1e4e8;--ec-frm-edBg:#fff;--ec-frm-trmTtbFg:#2f363d;--ec-frm-trmTtbDotsFg:#2f363d;--ec-frm-trmTtbBg:#fff;--ec-frm-trmTtbBrdBtmCol:#e1e4e8;--ec-frm-trmBg:#f6f8fa;--ec-frm-inlBtnFg:#24292e;--ec-frm-inlBtnBg:#24292e;--ec-frm-inlBtnBrd:#24292e;--ec-frm-tooltipSuccessBg:#208638}:root:not([data-theme='github-dark']) .expressive-code .ec-line :where(span[style^='--']:not([class])){color:var(--1, inherit);background-color:var(--1bg, transparent);font-style:var(--1fs, inherit);font-weight:var(--1fw, inherit);text-decoration:var(--1td, inherit)}}:root[data-theme='github-light'] .expressive-code:not([data-theme='github-dark']),.expressive-code[data-theme='github-light']{--ec-brdCol:#e1e4e8;--ec-codeBg:#fff;--ec-codeFg:#24292e;--ec-codeSelBg:#0366d625;--ec-gtrFg:#1b1f2381;--ec-gtrBrdCol:#1b1f2333;--ec-gtrHlFg:#24292eab;--ec-uiSelBg:#e2e5e9;--ec-uiSelFg:#2f363d;--ec-focusBrd:#2188ff;--ec-sbThumbCol:#959da533;--ec-sbThumbHoverCol:#959da5eb;--ec-tm-markBg:#9fb6ff80;--ec-tm-insBg:#94c68480;--ec-tm-insDiffIndCol:#3a692fd0;--ec-tm-delBg:#fea09280;--ec-tm-delDiffIndCol:#97453dd0;--ec-frm-shdCol:#00000028;--ec-frm-frameBoxShdCssVal:0.1rem 0.1rem 0.2rem #00000028;--ec-frm-edActTabBg:#fff;--ec-frm-edActTabFg:#2f363d;--ec-frm-edActTabIndBtmCol:#fff;--ec-frm-edTabBarBg:#f6f8fa;--ec-frm-edTabBarBrdCol:#e1e4e8;--ec-frm-edTabBarBrdBtmCol:#e1e4e8;--ec-frm-edBg:#fff;--ec-frm-trmTtbFg:#2f363d;--ec-frm-trmTtbDotsFg:#2f363d;--ec-frm-trmTtbBg:#fff;--ec-frm-trmTtbBrdBtmCol:#e1e4e8;--ec-frm-trmBg:#f6f8fa;--ec-frm-inlBtnFg:#24292e;--ec-frm-inlBtnBg:#24292e;--ec-frm-inlBtnBrd:#24292e;--ec-frm-tooltipSuccessBg:#208638}:root[data-theme='github-light'] .expressive-code:not([data-theme='github-dark']) .ec-line :where(span[style^='--']:not([class])),.expressive-code[data-theme='github-light'] .ec-line :where(span[style^='--']:not([class])){color:var(--1, inherit);background-color:var(--1bg, transparent);font-style:var(--1fs, inherit);font-weight:var(--1fw, inherit);text-decoration:var(--1td, inherit)}</style><script type=\"module\">try{(()=>{var e=window.requestIdleCallback||(e=>setTimeout(e,1)),t=window.cancelIdleCallback||clearTimeout;function r(e,t){e.querySelectorAll?.(\".expressive-code pre > code\").forEach(e=>{let r=e.parentElement;r&&t.observe(r)})}var o=function(r){let o,n,a=new Set;return new ResizeObserver(i=>{i.forEach(e=>a.add(e.target)),o&&clearTimeout(o),n&&t(n),o=setTimeout(()=>{n&&t(n),n=e(()=>{a.forEach(e=>r(e)),a.clear()})},250)})}(function(e){if(!e)return;let t=null!==e.getAttribute(\"tabindex\"),r=e.scrollWidth>e.clientWidth;r&&!t?(e.setAttribute(\"tabindex\",\"0\"),e.setAttribute(\"role\",\"region\")):!r&&t&&(e.removeAttribute(\"tabindex\"),e.removeAttribute(\"role\"))});r(document,o),new MutationObserver(e=>e.forEach(e=>e.addedNodes.forEach(e=>{r(e,o)}))).observe(document.body,{childList:!0,subtree:!0}),document.addEventListener(\"astro:page-load\",()=>{r(document,o)})})()}catch(e){console.error(\"[EC] tabindex-js-module failed:\",e)}</script><script type=\"module\">try{(()=>{async function e(e){let t=e.currentTarget,o=t.dataset,n=!1,a=o.code.replace(/\\u007f/g,\"\\n\");try{await navigator.clipboard.writeText(a),n=!0}catch{n=function(e){let t=document.createElement(\"pre\");Object.assign(t.style,{opacity:\"0\",pointerEvents:\"none\",position:\"absolute\",overflow:\"hidden\",left:\"0\",top:\"0\",width:\"20px\",height:\"20px\",webkitUserSelect:\"auto\",userSelect:\"all\"}),t.ariaHidden=\"true\",t.textContent=e,document.body.appendChild(t);let o=document.createRange();o.selectNode(t);let n=getSelection();if(!n)return!1;n.removeAllRanges(),n.addRange(o);let a=!1;try{a=document.execCommand(\"copy\")}finally{n.removeAllRanges(),document.body.removeChild(t)}return a}(a)}if(!n||t.parentNode?.querySelector(\".feedback\"))return;let d=t.parentNode?.querySelector(\"[aria-live]\"),r=document.createElement(\"div\");r.classList.add(\"feedback\"),r.append(o.copied),d.append(r),r.offsetWidth,requestAnimationFrame(()=>r?.classList.add(\"show\"));let c=()=>!r||r.classList.remove(\"show\"),i=()=>{!r||parseFloat(getComputedStyle(r).opacity)>0||(r.remove(),r=void 0)};setTimeout(c,1500),setTimeout(i,2500),t.addEventListener(\"blur\",c),r.addEventListener(\"transitioncancel\",i),r.addEventListener(\"transitionend\",i)}function t(t){t.querySelectorAll?.(\".expressive-code .copy button\").forEach(t=>t.addEventListener(\"click\",e))}t(document),new MutationObserver(e=>e.forEach(e=>e.addedNodes.forEach(e=>{t(e)}))).observe(document.body,{childList:!0,subtree:!0}),document.addEventListener(\"astro:page-load\",()=>{t(document)})})()}catch(e){console.error(\"[EC] copy-js-module failed:\",e)}</script><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">plugins</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">id</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#9ECBFF;--1:#032F62\">\"fabric-loom\"</span><span style=\"--0:#E1E4E8;--1:#24292E\">) version </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"1.10-SNAPSHOT\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">group </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"net.ashwork.mc\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">version </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"0.0.0\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">base.archivesName </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"legacy\"</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">loom</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">noIntermediateMappings</span><span style=\"--0:#E1E4E8;--1:#24292E\">()</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">clientOnlyMinecraftJar</span><span style=\"--0:#E1E4E8;--1:#24292E\">()</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">dependencies</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">minecraft</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#9ECBFF;--1:#032F62\">\"com.mojang:minecraft:&lt;minecraft_version&gt;\"</span><span style=\"--0:#E1E4E8;--1:#24292E\">)</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">mappings</span><span style=\"--0:#E1E4E8;--1:#24292E\">(loom.</span><span style=\"--0:#B392F0;--1:#6F42C1\">layered</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// No mappings required</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">})</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">modImplementation</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#9ECBFF;--1:#032F62\">\"net.fabricmc:fabric-loader:0.16.14\"</span><span style=\"--0:#E1E4E8;--1:#24292E\">)</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">tasks.</span><span style=\"--0:#B392F0;--1:#6F42C1\">withType</span><span style=\"--0:#E1E4E8;--1:#24292E\">&lt;</span><span style=\"--0:#B392F0;--1:#6F42C1\">JavaCompile</span><span style=\"--0:#E1E4E8;--1:#24292E\">&gt; {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">options.release </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">8</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">options.encoding </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"UTF-8\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">java</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">sourceCompatibility </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> JavaVersion.VERSION_1_8</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">targetCompatibility </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> JavaVersion.VERSION_1_8</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"plugins {    id(&quot;fabric-loom&quot;) version &quot;1.10-SNAPSHOT&quot;}group = &quot;net.ashwork.mc&quot;version = &quot;0.0.0&quot;base.archivesName = &quot;legacy&quot;loom {    noIntermediateMappings()    clientOnlyMinecraftJar()}dependencies {    minecraft(&quot;com.mojang:minecraft:<minecraft_version>&quot;)    mappings(loom.layered {        // No mappings required    })    modImplementation(&quot;net.fabricmc:fabric-loader:0.16.14&quot;)}tasks.withType<JavaCompile> {    options.release = 8    options.encoding = &quot;UTF-8&quot;}java {    sourceCompatibility = JavaVersion.VERSION_1_8    targetCompatibility = JavaVersion.VERSION_1_8}\"><div></div></button></div></figure></div>\n<p>All we need to do is check the downloaded source and see if it was obfuscated or not.</p>\n<p>And running through all the versions in the manifest from oldest to newest, the first obfuscated version is <a href=\"https://minecraft.wiki/w/Java_Edition_Classic_0.0.13a_03\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\"><code>c0.0.13a_03</code> (or <code>0.0.13a_03</code>)</a>. And since the version prior to that, <a href=\"https://minecraft.wiki/w/Java_Edition_Classic_0.0.13a\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\"><code>c0.0.13a</code> (or <code>0.0.13a</code>)</a>, isn't obfuscated, we have our answer!</p>\n<p>Well, sort of. There's a slight hiccup to this reasoning. According to the Minecraft Wiki:</p>\n<blockquote>\n<p>\"An early development version of 0.0.13a, mislabelled as its released counterpart, is available in the launcher. It was used for testing the world size, and can only generate flat terrain, instead of the actual terrain used in the full release. Many features from 0.0.12a are still present, such as using the \"generating level\" screen from that version instead of the one from 0.0.13a.\"</p>\n</blockquote>\n<p>This means that we could potentially be dealing with some kind of mislabeling. Of course, there is some evidence that <code>0.0.13a_03</code> can be the first obfuscated version. Looking through the channel logs from the <a href=\"https://archive.org/details/Testvan-Minecraft-IRC-logs\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">#minecraft IRC server by Testvan</a>, we can see some supporting conversation from May 25th, 2009:</p>\n<blockquote>\n<ul>\n<li class=\"\">[04:22] &lt;taodih_away&gt; then last question , for developers <em>make sure you licence it then</em> can we expand the game as you say you only used 17/256 of the tilesets</li>\n<li class=\"\">[04:22] &lt;@Notch&gt; that's a really good idea</li>\n<li class=\"\">[04:22] * failgoat is now known as Stargoat</li>\n<li class=\"\">[04:22] &lt;@Notch&gt; charge less for it when it's beta, then more when it's done (but you still get the full version if you bought at beta)</li>\n<li class=\"\">[04:23] &lt;taodih_away&gt; maby an extra payment for the developers as the get the sourcecode</li>\n<li class=\"\">[04:23] &lt;mezo&gt; yeah</li>\n<li class=\"\">[04:23] &lt;@Notch&gt; taodih_away: I'm very much considering modding support. =)</li>\n<li class=\"\">[04:23] &lt;mezo&gt; people feel inclined to buy the beta that way</li>\n<li class=\"\">[04:23] &lt;taodih_away&gt; awsome</li>\n<li class=\"\">[04:23] &lt;pyl&gt; oh shit yes, modding support</li>\n<li class=\"\">[04:23] &lt;@Notch&gt; it'd probably be mostly for multiplayer, though, since that's where people run servers</li>\n<li class=\"\">[04:23] &lt;@Notch&gt; so you could set up a server with custom textures and blocks, possibly. =)</li>\n<li class=\"\">[04:23] &lt;pyl&gt; maybe i can finally have my earthworm mode :)</li>\n<li class=\"\">[04:23] &lt;vdgmprgrmr&gt; That'd be cool.</li>\n<li class=\"\">[04:23] &lt;taodih_away&gt; lol</li>\n<li class=\"\">[04:24] &lt;taodih_away&gt; hmmmmmi actuly meant real total modding</li>\n<li class=\"\">[04:24] &lt;MCXD&gt; I'd probably buy it too</li>\n<li class=\"\">[04:24] * neutrinka has joined #minecraft</li>\n<li class=\"\">[04:24] &lt;taodih_away&gt; that you actuly get the sourcecode</li>\n<li class=\"\">[04:25] &lt;taodih_away&gt; me to but i'll need the money first</li>\n<li class=\"\">[04:25] &lt;vdgmprgrmr&gt; ... That might be cool as well.</li>\n<li class=\"\">[04:25] &lt;@Notch&gt; I'm not going to opensource it or sell the source code</li>\n<li class=\"\">[04:25] &lt;vdgmprgrmr&gt; Yeah, expected that.</li>\n<li class=\"\">[04:25] &lt;@Notch&gt; if people reverse-engineer and so on, I can't (and won't! especially if they've paid me <!-- -->:D<!-- -->) stop them</li>\n<li class=\"\">[04:25] &lt;@Notch&gt; but as soon as you release the source code, you kinda encourage it, and I don't want to do that</li>\n<li class=\"\">[04:25] &lt;taodih_away&gt; ooooh</li>\n<li class=\"\">[04:25] &lt;taodih_away&gt; ok i'll need to study on java xD</li>\n<li class=\"\">[04:25] &lt;@Notch&gt; however, once sales starts dwindling, I could definitely see myself opensourcing it</li>\n</ul>\n</blockquote>\n<p>This conversation, from taodih_away \"[maybe] an extra payment for the developers as the get the sourcecode\" and @Notch \"I'm not going to opensource it or sell the source code' / 'if people reverse-engineer and so on, I can't (and won't! especially if they've paid me <!-- -->:D<!-- -->) stop them\" indicate that, at this point in time, the Minecraft source code was already obfuscated. There's even further proof from May 29th, 2009:</p>\n<blockquote>\n<ul>\n<li class=\"\">[05:52] &lt;taodih&gt; i hope the n error isint just because of that o-O</li>\n<li class=\"\">[05:52] &lt;@Notch&gt; the n error is caused by the loaded map having a width and height of 0</li>\n<li class=\"\">[05:53] &lt;taodih&gt; oh ok</li>\n<li class=\"\">[05:53] &lt;@Notch&gt; levels saved when there was some level file version problem (ie yesterday? the day before) could get corrupted like that</li>\n<li class=\"\">[05:53] &lt;taodih&gt; cunk when did you last saved??? o_O</li>\n<li class=\"\">[05:53] &lt;@Notch&gt; the sad thing is that the actual level data is null as well, so I can't recompute the level data for that</li>\n<li class=\"\">[05:53] &lt;taodih&gt; maby it was because of new updates</li>\n<li class=\"\">[05:53] &lt;@Notch&gt; it was a stupid mistake of mine</li>\n<li class=\"\">[05:54] &lt;@Notch&gt; I had changed to using the built in serialization in java, and it worked great locally</li>\n<li class=\"\">[05:54] &lt;Cunk&gt; i got the error right after i made the level.  the same night.  it wasn't something that happened a day or two later</li>\n<li class=\"\">[05:54] &lt;@Notch&gt; but I forgot that I obfuscate the game before uploading it, and that broke serialization between versions</li>\n<li class=\"\">[05:54] &lt;@Notch&gt; yes, I updated the client many times that night</li>\n<li class=\"\">[05:54] &lt;Cunk&gt; ah, ok.  then i guess it could have been a version thing</li>\n</ul>\n</blockquote>\n<p>@Notch \"but I forgot that I obfuscate the game before uploading it, and that broke serialization between versions\" indicates that the game was obfuscated prior to May 29th, 2009.</p>\n<p>So, I guess this is it, <code>0.0.13a_03</code> is the first obfuscated Minecraft version.</p>\n<p>...well, maybe we can dig up a bit more proof.</p>\n<p>There are two nearby versions that are archived somewhere else, and therefore not in the version manifest: <a href=\"https://minecraft.wiki/w/Java_Edition_Classic_0.0.12a_03\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\"><code>0.0.12a_03</code></a> and <a href=\"https://minecraft.wiki/w/Java_Edition_Classic_0.0.14a_08\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\"><code>0.0.14a_08</code></a>. If we decompile the JAR of these versions, we should be able to, at least, definitively prove to the best to our knowledge that <code>0.0.13a_03</code> is the first obfuscated Minecraft version.</p>\n<p>Luckily for us, <a href=\"https://omniarchive.uk/\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Omniarchive</a> provides a link to these versions. For brevity, I downloaded all versions from <code>0.0.11a</code> to <code>0.0.14a_08</code> just to verify our findings. For those curious:</p>\n<ul>\n<li class=\"\"><code>c0.0.11a-launcher.jar</code></li>\n<li class=\"\"><code>c0.0.12a_03-200018.jar</code></li>\n<li class=\"\"><code>c0.0.13a-launcher.jar</code></li>\n<li class=\"\"><code>c0.0.13a_03.jar</code></li>\n<li class=\"\"><code>c0.0.13a_03-launcher.jar</code></li>\n<li class=\"\"><code>c0.0.14a_08.jar</code></li>\n</ul>\n<p>And for whether they were obfuscated:</p>\n<table><thead><tr><th style=\"text-align:center\">JAR</th><th style=\"text-align:left\">Obfuscated</th></tr></thead><tbody><tr><td style=\"text-align:center\"><code>c0.0.11a-launcher.jar</code></td><td style=\"text-align:left\">No</td></tr><tr><td style=\"text-align:center\"><code>c0.0.12a_03-200018.jar</code></td><td style=\"text-align:left\">Yes</td></tr><tr><td style=\"text-align:center\"><code>c0.0.13a-launcher.jar</code></td><td style=\"text-align:left\">No</td></tr><tr><td style=\"text-align:center\"><code>c0.0.13a_03.jar</code></td><td style=\"text-align:left\">Yes</td></tr><tr><td style=\"text-align:center\"><code>c0.0.13a_03-launcher.jar</code></td><td style=\"text-align:left\">Yes</td></tr><tr><td style=\"text-align:center\"><code>c0.0.14a_08.jar</code></td><td style=\"text-align:left\">Partial</td></tr></tbody></table>\n<p>...huh. Well that's a problem. Let's expand our version range a bit more just to verify:</p>\n<table><thead><tr><th style=\"text-align:center\">JAR</th><th style=\"text-align:left\">Obfuscated</th></tr></thead><tbody><tr><td style=\"text-align:center\"><code>c0.0.15a-05311904.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.16a_02-081047.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.17a-2014.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.18a_02.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.19a_04.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.19a_06-0137.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.20a_01.jar</code></td><td style=\"text-align:left\">Partial</td></tr><tr><td style=\"text-align:center\"><code>c0.0.20a_02.jar</code></td><td style=\"text-align:left\">Partial</td></tr></tbody></table>\n<p>...hmm. Yeah. Still weird. First of all, <a href=\"https://minecraft.wiki/w/Java_Edition_Classic_0.0.12a_03\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\"><code>c0.0.12a_03</code> (or <code>0.0.12a_03</code>)</a> is obfuscated, which is earlier than the <code>c0.0.13a_03</code> release. Meanwhile, JARs from <code>c0.0.14a_08</code> have some unobfuscated classes.</p>\n<p>For the latter, Minecraft originally used Java's <code>Serializable</code> class to handle saving data to disk. <code>Serializable</code>, along with its associated <code>ObjectInputStream</code> and <code>ObjectOutputStream</code> used reflection to read a class's fields by their name to write them to some file. Naturally, if a field's or class's name changes, for example due to obfuscation, the game may be unable to read or write the data deterministically. As such, the easiest way to handle this was to leave it deobfuscated. (Credit to <a href=\"https://github.com/CelDaemon\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Celeste</a> for the accurate deduction)</p>\n<p>As for the former, the obfuscated existence of <code>0.0.12a_03</code> while <code>0.0.13a</code> being unobfuscated in the launcher provides two potential conclusions:</p>\n<p>One, <code>0.0.13a</code> is mislabelled in the Minecraft launcher and actually represents a previous version. The <a href=\"https://docs.google.com/spreadsheets/d/1OCxMNQLeZJi4BlKKwHx2OlzktKiLEwFXnmCrSdAFwYQ/htmlview#gid=872531987\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Omniarchive version spreadsheet</a> mentions that a lot of the versions in the launcher are either incorrectly labelled or 'developer builds', meaning not the ones that were actually released to players, but the raw compiled JAR.</p>\n<p>Two, the versions in the Minecraft launcher are not the \"true\" versions, and are instead re-releases. The spreadsheet also notes that the versions released in the launcher were from 2013, compared to the archived versions from 2009. Going off that logic, <code>c0.0.11a</code> might have originally been obfuscated, but was later released in the launcher unobfuscated.</p>\n<p>Unfortunately, there's not much evidence supporting either claim enough to make any definitive statements. It's all guesswork as all other versions are lost as far as we know. Of course this may change in the future, so who knows?</p>\n<p>But for right now, the first version Minecraft was obfuscated is <a href=\"https://minecraft.wiki/w/Java_Edition_Classic_0.0.12a_03\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Classic 0.0.12a_03 (or <code>c0.0.12a_03</code>)</a>, with one big asterisk.</p>",
            "url": "https://blog.ashwork.net/minecraft/2026/06/07/obfuscation-addition",
            "title": "When was Minecraft obfuscated?",
            "summary": "Large language models like to lie, a lot.",
            "date_modified": "2026-06-07T19:01:01.000Z",
            "author": {
                "name": "ChampionAsh5357",
                "url": "https://github.com/ChampionAsh5357"
            },
            "tags": []
        },
        {
            "id": "https://blog.ashwork.net/minecraft/2026/05/23/menu-stack-move",
            "content_html": "<p>Did you know that when shift-clicking a stack within a GUI like a chest or dispenser, the stack will move from one inventory to the other? It's a feature that's been in the game since <a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.5\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">b1.5</a> and hasn't really changed much.</p>\n<p>The method that manages this shift-clicking behavior is <code>AbstractContainerMenu.quickMoveStack()</code>, as internally, shift-clicking performs the <code>ContainerInput.QUICK_MOVE</code> action. The logic for this is rather simple:</p>\n<div class=\"expressive-code\"><style>.expressive-code{font-family:var(--ec-uiFontFml);font-size:var(--ec-uiFontSize);font-weight:var(--ec-uiFontWg);line-height:var(--ec-uiLineHt);text-size-adjust:none;-webkit-text-size-adjust:none}.expressive-code *:not(:is(svg, svg *)){all:revert;box-sizing:border-box}.expressive-code pre{display:flex;margin:0;padding:0;border:var(--ec-brdWd) solid var(--ec-brdCol);border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));background:var(--ec-codeBg)}.expressive-code pre:focus-visible{outline:3px solid var(--ec-focusBrd);outline-offset:-3px}.expressive-code pre > code{all:unset;display:block;flex:1 0 100%;padding:var(--ec-codePadBlk) 0;color:var(--ec-codeFg);font-family:var(--ec-codeFontFml);font-size:var(--ec-codeFontSize);font-weight:var(--ec-codeFontWg);line-height:var(--ec-codeLineHt)}.expressive-code pre{overflow-x:auto}.expressive-code pre.wrap .ec-line .code{white-space:pre-wrap;overflow-wrap:break-word;min-width:min(20ch, var(--ecMaxLine, 20ch))}.expressive-code pre.wrap .ec-line .code span.indent{white-space:pre}.expressive-code pre::-webkit-scrollbar,.expressive-code pre::-webkit-scrollbar-track{background-color:inherit;border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));border-top-left-radius:0;border-top-right-radius:0}.expressive-code pre::-webkit-scrollbar-thumb{background-color:var(--ec-sbThumbCol);border:4px solid transparent;background-clip:content-box;border-radius:10px}.expressive-code pre::-webkit-scrollbar-thumb:hover{background-color:var(--ec-sbThumbHoverCol)}.expressive-code .ec-line{direction:ltr;unicode-bidi:isolate;display:grid;grid-template-areas:'gutter code';grid-template-columns:auto 1fr;position:relative}.expressive-code .ec-line .gutter{grid-area:gutter;color:var(--ec-gtrFg)}.expressive-code .ec-line .gutter > *{pointer-events:none;user-select:none;-webkit-user-select:none}.expressive-code .ec-line .gutter ~ .code{--ecLineBrdCol:var(--ec-gtrBrdCol)}.expressive-code .ec-line.highlight .gutter{color:var(--ec-gtrHlFg)}.expressive-code .ec-line .code{grid-area:code;position:relative;box-sizing:content-box;padding-inline-start:calc(var(--ecIndent, 0ch) + var(--ec-codePadInl) - var(--ecGtrBrdWd));padding-inline-end:var(--ec-codePadInl);text-indent:calc(var(--ecIndent, 0ch) * -1)}.expressive-code .ec-line .code::before,.expressive-code .ec-line .code::after,.expressive-code .ec-line .code :where(*){text-indent:0}.expressive-code .ec-line .code{--ecGtrBrdWd:var(--ec-gtrBrdWd);border-inline-start:var(--ecGtrBrdWd) solid var(--ecLineBrdCol, transparent)}.expressive-code .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.expressive-code .ec-line.mark{--tmLineBgCol:var(--ec-tm-markBg)}.expressive-code .ec-line.mark .code{--ecLineBrdCol:var(--ec-tm-markBrdCol)}.expressive-code .ec-line.ins{--tmLineBgCol:var(--ec-tm-insBg);--tmLabel:var(--ec-tm-insDiffIndContent)}.expressive-code .ec-line.ins .code{--ecLineBrdCol:var(--ec-tm-insBrdCol)}.expressive-code .ec-line.ins .code::before{color:var(--ec-tm-insDiffIndCol)}.expressive-code .ec-line.del{--tmLineBgCol:var(--ec-tm-delBg);--tmLabel:var(--ec-tm-delDiffIndContent)}.expressive-code .ec-line.del .code{--ecLineBrdCol:var(--ec-tm-delBrdCol)}.expressive-code .ec-line.del .code::before{color:var(--ec-tm-delDiffIndCol)}.expressive-code .ec-line.mark,.expressive-code .ec-line.ins,.expressive-code .ec-line.del{background:var(--tmLineBgCol)}.expressive-code .ec-line.mark .code,.expressive-code .ec-line.ins .code,.expressive-code .ec-line.del .code{--ecGtrBrdWd:var(--ec-tm-lineMarkerAccentWd)}.expressive-code .ec-line.mark .code::before,.expressive-code .ec-line.ins .code::before,.expressive-code .ec-line.del .code::before{display:block;position:absolute;left:0;box-sizing:border-box;content:var(--tmLabel, ' ');padding-inline-start:var(--ec-tm-lineDiffIndMargLeft);text-align:center;white-space:pre}.expressive-code .ec-line.mark.tm-label .code::before,.expressive-code .ec-line.ins.tm-label .code::before,.expressive-code .ec-line.del.tm-label .code::before{background:var(--ecLineBrdCol);padding:0 calc(var(--ec-tm-lineMarkerLabelPadInl) + var(--ec-tm-lineMarkerAccentWd)) 0 var(--ec-tm-lineMarkerLabelPadInl);color:var(--ec-tm-lineMarkerLabelCol)}.expressive-code .ec-line mark{--tmInlineBgCol:var(--ec-tm-markBg);--tmInlineBrdCol:var(--ec-tm-markBrdCol)}.expressive-code .ec-line ins{--tmInlineBgCol:var(--ec-tm-insBg);--tmInlineBrdCol:var(--ec-tm-insBrdCol)}.expressive-code .ec-line del{--tmInlineBgCol:var(--ec-tm-delBg);--tmInlineBrdCol:var(--ec-tm-delBrdCol)}.expressive-code .ec-line mark,.expressive-code .ec-line ins,.expressive-code .ec-line del{all:unset;display:inline-block;position:relative;--tmBrdL:var(--ec-tm-inlMarkerBrdWd);--tmBrdR:var(--ec-tm-inlMarkerBrdWd);--tmRadL:var(--ec-tm-inlMarkerBrdRad);--tmRadR:var(--ec-tm-inlMarkerBrdRad);margin-inline:0.025rem;padding-inline:var(--ec-tm-inlMarkerPad);border-radius:var(--tmRadL) var(--tmRadR) var(--tmRadR) var(--tmRadL);background:var(--tmInlineBgCol);background-clip:padding-box}.expressive-code .ec-line mark.open-start,.expressive-code .ec-line ins.open-start,.expressive-code .ec-line del.open-start{margin-inline-start:0;padding-inline-start:0;--tmBrdL:0px;--tmRadL:0}.expressive-code .ec-line mark.open-end,.expressive-code .ec-line ins.open-end,.expressive-code .ec-line del.open-end{margin-inline-end:0;padding-inline-end:0;--tmBrdR:0px;--tmRadR:0}.expressive-code .ec-line mark::before,.expressive-code .ec-line ins::before,.expressive-code .ec-line del::before{content:'';position:absolute;pointer-events:none;display:inline-block;inset:0;border-radius:var(--tmRadL) var(--tmRadR) var(--tmRadR) var(--tmRadL);border:var(--ec-tm-inlMarkerBrdWd) solid var(--tmInlineBrdCol);border-inline-width:var(--tmBrdL) var(--tmBrdR)}.expressive-code .frame{all:unset;position:relative;display:block;--header-border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));--tab-border-radius:calc(var(--ec-frm-edTabBrdRad) + var(--ec-brdWd));--button-spacing:0.4rem;--code-background:var(--ec-frm-edBg);border-radius:var(--header-border-radius);box-shadow:var(--ec-frm-frameBoxShdCssVal)}.expressive-code .frame .header{display:none;z-index:1;position:relative;border-radius:var(--header-border-radius) var(--header-border-radius) 0 0}.expressive-code .frame.has-title pre,.expressive-code .frame.has-title code,.expressive-code .frame.is-terminal pre,.expressive-code .frame.is-terminal code{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.expressive-code .frame .title:empty:before{content:'\\a0'}.expressive-code .frame.has-title:not(.is-terminal){--button-spacing:calc(1.9rem + 2 * (var(--ec-uiPadBlk) + var(--ec-frm-edActTabIndHt)))}.expressive-code .frame.has-title:not(.is-terminal) .title{position:relative;color:var(--ec-frm-edActTabFg);background:var(--ec-frm-edActTabBg);background-clip:padding-box;margin-block-start:var(--ec-frm-edTabsMargBlkStart);padding:calc(var(--ec-uiPadBlk) + var(--ec-frm-edActTabIndHt)) var(--ec-uiPadInl);border:var(--ec-brdWd) solid var(--ec-frm-edActTabBrdCol);border-radius:var(--tab-border-radius) var(--tab-border-radius) 0 0;border-bottom:none;overflow:hidden}.expressive-code .frame.has-title:not(.is-terminal) .title::after{content:'';position:absolute;pointer-events:none;inset:0;border-top:var(--ec-frm-edActTabIndHt) solid var(--ec-frm-edActTabIndTopCol);border-bottom:var(--ec-frm-edActTabIndHt) solid var(--ec-frm-edActTabIndBtmCol)}.expressive-code .frame.has-title:not(.is-terminal) .header{display:flex;background:linear-gradient(to top, var(--ec-frm-edTabBarBrdBtmCol) var(--ec-brdWd), transparent var(--ec-brdWd)),linear-gradient(var(--ec-frm-edTabBarBg), var(--ec-frm-edTabBarBg));background-repeat:no-repeat;padding-inline-start:var(--ec-frm-edTabsMargInlStart)}.expressive-code .frame.has-title:not(.is-terminal) .header::before{content:'';position:absolute;pointer-events:none;inset:0;border:var(--ec-brdWd) solid var(--ec-frm-edTabBarBrdCol);border-radius:inherit;border-bottom:none}.expressive-code .frame.is-terminal{--button-spacing:calc(1.9rem + var(--ec-brdWd) + 2 * var(--ec-uiPadBlk));--code-background:var(--ec-frm-trmBg)}.expressive-code .frame.is-terminal .header{display:flex;align-items:center;justify-content:center;padding-block:var(--ec-uiPadBlk);padding-block-end:calc(var(--ec-uiPadBlk) + var(--ec-brdWd));position:relative;font-weight:500;letter-spacing:0.025ch;color:var(--ec-frm-trmTtbFg);background:var(--ec-frm-trmTtbBg);border:var(--ec-brdWd) solid var(--ec-brdCol);border-bottom:none}.expressive-code .frame.is-terminal .header::before{content:'';position:absolute;pointer-events:none;left:var(--ec-uiPadInl);width:2.1rem;height:0.56rem;line-height:0;background-color:var(--ec-frm-trmTtbDotsFg);opacity:var(--ec-frm-trmTtbDotsOpa);-webkit-mask-image:var(--ec-frm-trmIcon);-webkit-mask-repeat:no-repeat;mask-image:var(--ec-frm-trmIcon);mask-repeat:no-repeat}.expressive-code .frame.is-terminal .header::after{content:'';position:absolute;pointer-events:none;inset:0;border-bottom:var(--ec-brdWd) solid var(--ec-frm-trmTtbBrdBtmCol)}.expressive-code .frame pre{background:var(--code-background)}.expressive-code .copy{display:flex;gap:0.25rem;flex-direction:row;position:absolute;inset-block-start:calc(var(--ec-brdWd) + var(--button-spacing));inset-inline-end:calc(var(--ec-brdWd) + var(--ec-uiPadInl) / 2)}@media (scripting: none){.expressive-code .copy{display:none}}.expressive-code .copy{direction:ltr;unicode-bidi:isolate}.expressive-code .copy button{position:relative;align-self:flex-end;margin:0;padding:0;border:none;border-radius:0.2rem;z-index:1;cursor:pointer;transition-property:opacity, background, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94);width:2.5rem;height:2.5rem;background:var(--code-background);opacity:0.75}.expressive-code .copy button div{position:absolute;inset:0;border-radius:inherit;background:var(--ec-frm-inlBtnBg);opacity:var(--ec-frm-inlBtnBgIdleOpa);transition-property:inherit;transition-duration:inherit;transition-timing-function:inherit}.expressive-code .copy button::before{content:'';position:absolute;pointer-events:none;inset:0;border-radius:inherit;border:var(--ec-brdWd) solid var(--ec-frm-inlBtnBrd);opacity:var(--ec-frm-inlBtnBrdOpa)}.expressive-code .copy button::after{content:'';position:absolute;pointer-events:none;inset:0;background-color:var(--ec-frm-inlBtnFg);-webkit-mask-image:var(--ec-frm-copyIcon);-webkit-mask-repeat:no-repeat;mask-image:var(--ec-frm-copyIcon);mask-repeat:no-repeat;margin:0.475rem;line-height:0}.expressive-code .copy button:hover,.expressive-code .copy button:focus:focus-visible{opacity:1}.expressive-code .copy button:hover div,.expressive-code .copy button:focus:focus-visible div{opacity:var(--ec-frm-inlBtnBgHoverOrFocusOpa)}.expressive-code .copy button:active{opacity:1}.expressive-code .copy button:active div{opacity:var(--ec-frm-inlBtnBgActOpa)}.expressive-code .copy .feedback{--tooltip-arrow-size:0.35rem;--tooltip-bg:var(--ec-frm-tooltipSuccessBg);color:var(--ec-frm-tooltipSuccessFg);pointer-events:none;user-select:none;-webkit-user-select:none;position:relative;align-self:center;background-color:var(--tooltip-bg);z-index:99;padding:0.125rem 0.75rem;border-radius:0.2rem;margin-inline-end:var(--tooltip-arrow-size);opacity:0;transition-property:opacity, transform;transition-duration:0.2s;transition-timing-function:ease-in-out;transform:translate3d(0, 0.25rem, 0)}.expressive-code .copy .feedback::after{content:'';position:absolute;pointer-events:none;top:calc(50% - var(--tooltip-arrow-size));inset-inline-end:calc(-2 * (var(--tooltip-arrow-size) - 0.5px));border:var(--tooltip-arrow-size) solid transparent;border-inline-start-color:var(--tooltip-bg)}.expressive-code .copy .feedback.show{opacity:1;transform:translate3d(0, 0, 0)}@media (hover: hover){.expressive-code{}.expressive-code .copy button{opacity:0;width:2rem;height:2rem}.expressive-code .frame:hover .copy button:not(:hover),.expressive-code .frame:focus-within :focus-visible ~ .copy button:not(:hover),.expressive-code .frame .copy .feedback.show ~ button:not(:hover){opacity:0.75}}.expressive-code :nth-child(1 of .ec-line) .code{padding-inline-end:calc(2rem + var(--ec-codePadInl))}:root,:root:not([data-theme='github-dark']) .expressive-code[data-theme='github-dark']{--ec-brdRad:0.3rem;--ec-brdWd:1.5px;--ec-brdCol:#1b1f23;--ec-codeFontFml:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;--ec-codeFontSize:0.85rem;--ec-codeFontWg:400;--ec-codeLineHt:1.65;--ec-codePadBlk:1rem;--ec-codePadInl:1.35rem;--ec-codeBg:#24292e;--ec-codeFg:#e1e4e8;--ec-codeSelBg:#3392ff44;--ec-gtrFg:#727980;--ec-gtrBrdCol:#72798033;--ec-gtrBrdWd:1.5px;--ec-gtrHlFg:#e1e4e896;--ec-uiFontFml:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';--ec-uiFontSize:0.9rem;--ec-uiFontWg:400;--ec-uiLineHt:1.65;--ec-uiPadBlk:0.25rem;--ec-uiPadInl:1rem;--ec-uiSelBg:#39414a;--ec-uiSelFg:#e1e4e8;--ec-focusBrd:#005cc5;--ec-sbThumbCol:#6a737d33;--ec-sbThumbHoverCol:#6a737dd1;--ec-tm-lineMarkerAccentMarg:0rem;--ec-tm-lineMarkerAccentWd:0.15rem;--ec-tm-lineMarkerLabelPadInl:0.2rem;--ec-tm-lineMarkerLabelCol:white;--ec-tm-lineDiffIndMargLeft:0.3rem;--ec-tm-inlMarkerBrdWd:1.5px;--ec-tm-inlMarkerBrdRad:0.2rem;--ec-tm-inlMarkerPad:0.15rem;--ec-tm-insDiffIndContent:'+';--ec-tm-delDiffIndContent:'-';--ec-tm-markBg:#264a8980;--ec-tm-markBrdCol:#5570b3d0;--ec-tm-insBg:#26561c80;--ec-tm-insBrdCol:#4e7e41d0;--ec-tm-insDiffIndCol:#7eb070d0;--ec-tm-delBg:#81322b80;--ec-tm-delBrdCol:#ae594fd0;--ec-tm-delDiffIndCol:#e68a7ed0;--ec-frm-shdCol:#0000005b;--ec-frm-frameBoxShdCssVal:0.1rem 0.1rem 0.2rem #0000005b;--ec-frm-edActTabBg:#24292e;--ec-frm-edActTabFg:#e1e4e8;--ec-frm-edActTabBrdCol:transparent;--ec-frm-edActTabIndHt:1.5px;--ec-frm-edActTabIndTopCol:#f9826c;--ec-frm-edActTabIndBtmCol:#24292e;--ec-frm-edTabsMargInlStart:0;--ec-frm-edTabsMargBlkStart:0;--ec-frm-edTabBrdRad:0.3rem;--ec-frm-edTabBarBg:#1f2428;--ec-frm-edTabBarBrdCol:#1b1f23;--ec-frm-edTabBarBrdBtmCol:#1b1f23;--ec-frm-edBg:#24292e;--ec-frm-trmTtbFg:#e1e4e8;--ec-frm-trmTtbDotsFg:#e1e4e8;--ec-frm-trmTtbDotsOpa:0.15;--ec-frm-trmTtbBg:#24292e;--ec-frm-trmTtbBrdBtmCol:#1b1f23;--ec-frm-trmBg:#1f2428;--ec-frm-inlBtnFg:#e1e4e8;--ec-frm-inlBtnBg:#e1e4e8;--ec-frm-inlBtnBgIdleOpa:0;--ec-frm-inlBtnBgHoverOrFocusOpa:0.2;--ec-frm-inlBtnBgActOpa:0.3;--ec-frm-inlBtnBrd:#e1e4e8;--ec-frm-inlBtnBrdOpa:0.4;--ec-frm-tooltipSuccessBg:#228739;--ec-frm-tooltipSuccessFg:white;--ec-frm-copyIcon:url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.75'%3E%3Cpath%20d%3D'M3%2019a2%202%200%200%201-1-2V2a2%202%200%200%201%201-1h13a2%202%200%200%201%202%201'%2F%3E%3Crect%20x%3D'6'%20y%3D'5'%20width%3D'16'%20height%3D'18'%20rx%3D'1.5'%20ry%3D'1.5'%2F%3E%3C%2Fsvg%3E\");--ec-frm-trmIcon:url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2060%2016'%20preserveAspectRatio%3D'xMidYMid%20meet'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'30'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'52'%20cy%3D'8'%20r%3D'8'%2F%3E%3C%2Fsvg%3E\")}.expressive-code .ec-line :where(span[style^='--']:not([class])),:root:not([data-theme='github-dark']) .expressive-code[data-theme='github-dark'] .ec-line :where(span[style^='--']:not([class])){color:var(--0, inherit);background-color:var(--0bg, transparent);font-style:var(--0fs, inherit);font-weight:var(--0fw, inherit);text-decoration:var(--0td, inherit)}@media (prefers-color-scheme: light){:root:not([data-theme='github-dark']){--ec-brdCol:#e1e4e8;--ec-codeBg:#fff;--ec-codeFg:#24292e;--ec-codeSelBg:#0366d625;--ec-gtrFg:#1b1f2381;--ec-gtrBrdCol:#1b1f2333;--ec-gtrHlFg:#24292eab;--ec-uiSelBg:#e2e5e9;--ec-uiSelFg:#2f363d;--ec-focusBrd:#2188ff;--ec-sbThumbCol:#959da533;--ec-sbThumbHoverCol:#959da5eb;--ec-tm-markBg:#9fb6ff80;--ec-tm-insBg:#94c68480;--ec-tm-insDiffIndCol:#3a692fd0;--ec-tm-delBg:#fea09280;--ec-tm-delDiffIndCol:#97453dd0;--ec-frm-shdCol:#00000028;--ec-frm-frameBoxShdCssVal:0.1rem 0.1rem 0.2rem #00000028;--ec-frm-edActTabBg:#fff;--ec-frm-edActTabFg:#2f363d;--ec-frm-edActTabIndBtmCol:#fff;--ec-frm-edTabBarBg:#f6f8fa;--ec-frm-edTabBarBrdCol:#e1e4e8;--ec-frm-edTabBarBrdBtmCol:#e1e4e8;--ec-frm-edBg:#fff;--ec-frm-trmTtbFg:#2f363d;--ec-frm-trmTtbDotsFg:#2f363d;--ec-frm-trmTtbBg:#fff;--ec-frm-trmTtbBrdBtmCol:#e1e4e8;--ec-frm-trmBg:#f6f8fa;--ec-frm-inlBtnFg:#24292e;--ec-frm-inlBtnBg:#24292e;--ec-frm-inlBtnBrd:#24292e;--ec-frm-tooltipSuccessBg:#208638}:root:not([data-theme='github-dark']) .expressive-code .ec-line :where(span[style^='--']:not([class])){color:var(--1, inherit);background-color:var(--1bg, transparent);font-style:var(--1fs, inherit);font-weight:var(--1fw, inherit);text-decoration:var(--1td, inherit)}}:root[data-theme='github-light'] .expressive-code:not([data-theme='github-dark']),.expressive-code[data-theme='github-light']{--ec-brdCol:#e1e4e8;--ec-codeBg:#fff;--ec-codeFg:#24292e;--ec-codeSelBg:#0366d625;--ec-gtrFg:#1b1f2381;--ec-gtrBrdCol:#1b1f2333;--ec-gtrHlFg:#24292eab;--ec-uiSelBg:#e2e5e9;--ec-uiSelFg:#2f363d;--ec-focusBrd:#2188ff;--ec-sbThumbCol:#959da533;--ec-sbThumbHoverCol:#959da5eb;--ec-tm-markBg:#9fb6ff80;--ec-tm-insBg:#94c68480;--ec-tm-insDiffIndCol:#3a692fd0;--ec-tm-delBg:#fea09280;--ec-tm-delDiffIndCol:#97453dd0;--ec-frm-shdCol:#00000028;--ec-frm-frameBoxShdCssVal:0.1rem 0.1rem 0.2rem #00000028;--ec-frm-edActTabBg:#fff;--ec-frm-edActTabFg:#2f363d;--ec-frm-edActTabIndBtmCol:#fff;--ec-frm-edTabBarBg:#f6f8fa;--ec-frm-edTabBarBrdCol:#e1e4e8;--ec-frm-edTabBarBrdBtmCol:#e1e4e8;--ec-frm-edBg:#fff;--ec-frm-trmTtbFg:#2f363d;--ec-frm-trmTtbDotsFg:#2f363d;--ec-frm-trmTtbBg:#fff;--ec-frm-trmTtbBrdBtmCol:#e1e4e8;--ec-frm-trmBg:#f6f8fa;--ec-frm-inlBtnFg:#24292e;--ec-frm-inlBtnBg:#24292e;--ec-frm-inlBtnBrd:#24292e;--ec-frm-tooltipSuccessBg:#208638}:root[data-theme='github-light'] .expressive-code:not([data-theme='github-dark']) .ec-line :where(span[style^='--']:not([class])),.expressive-code[data-theme='github-light'] .ec-line :where(span[style^='--']:not([class])){color:var(--1, inherit);background-color:var(--1bg, transparent);font-style:var(--1fs, inherit);font-weight:var(--1fw, inherit);text-decoration:var(--1td, inherit)}</style><script type=\"module\">try{(()=>{var e=window.requestIdleCallback||(e=>setTimeout(e,1)),t=window.cancelIdleCallback||clearTimeout;function r(e,t){e.querySelectorAll?.(\".expressive-code pre > code\").forEach(e=>{let r=e.parentElement;r&&t.observe(r)})}var o=function(r){let o,n,a=new Set;return new ResizeObserver(i=>{i.forEach(e=>a.add(e.target)),o&&clearTimeout(o),n&&t(n),o=setTimeout(()=>{n&&t(n),n=e(()=>{a.forEach(e=>r(e)),a.clear()})},250)})}(function(e){if(!e)return;let t=null!==e.getAttribute(\"tabindex\"),r=e.scrollWidth>e.clientWidth;r&&!t?(e.setAttribute(\"tabindex\",\"0\"),e.setAttribute(\"role\",\"region\")):!r&&t&&(e.removeAttribute(\"tabindex\"),e.removeAttribute(\"role\"))});r(document,o),new MutationObserver(e=>e.forEach(e=>e.addedNodes.forEach(e=>{r(e,o)}))).observe(document.body,{childList:!0,subtree:!0}),document.addEventListener(\"astro:page-load\",()=>{r(document,o)})})()}catch(e){console.error(\"[EC] tabindex-js-module failed:\",e)}</script><script type=\"module\">try{(()=>{async function e(e){let t=e.currentTarget,o=t.dataset,n=!1,a=o.code.replace(/\\u007f/g,\"\\n\");try{await navigator.clipboard.writeText(a),n=!0}catch{n=function(e){let t=document.createElement(\"pre\");Object.assign(t.style,{opacity:\"0\",pointerEvents:\"none\",position:\"absolute\",overflow:\"hidden\",left:\"0\",top:\"0\",width:\"20px\",height:\"20px\",webkitUserSelect:\"auto\",userSelect:\"all\"}),t.ariaHidden=\"true\",t.textContent=e,document.body.appendChild(t);let o=document.createRange();o.selectNode(t);let n=getSelection();if(!n)return!1;n.removeAllRanges(),n.addRange(o);let a=!1;try{a=document.execCommand(\"copy\")}finally{n.removeAllRanges(),document.body.removeChild(t)}return a}(a)}if(!n||t.parentNode?.querySelector(\".feedback\"))return;let d=t.parentNode?.querySelector(\"[aria-live]\"),r=document.createElement(\"div\");r.classList.add(\"feedback\"),r.append(o.copied),d.append(r),r.offsetWidth,requestAnimationFrame(()=>r?.classList.add(\"show\"));let c=()=>!r||r.classList.remove(\"show\"),i=()=>{!r||parseFloat(getComputedStyle(r).opacity)>0||(r.remove(),r=void 0)};setTimeout(c,1500),setTimeout(i,2500),t.addEventListener(\"blur\",c),r.addEventListener(\"transitioncancel\",i),r.addEventListener(\"transitionend\",i)}function t(t){t.querySelectorAll?.(\".expressive-code .copy button\").forEach(t=>t.addEventListener(\"click\",e))}t(document),new MutationObserver(e=>e.forEach(e=>e.addedNodes.forEach(e=>{t(e)}))).observe(document.body,{childList:!0,subtree:!0}),document.addEventListener(\"astro:page-load\",()=>{t(document)})})()}catch(e){console.error(\"[EC] copy-js-module failed:\",e)}</script><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// From </span><span style=\"--0:#99A0A6;--1:#616972\"><a href=\"https://mcsrc.dev/1/26.1.2/net/minecraft/world/inventory/CraftingMenu#L105-149\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"ec-link\" style=\"color:inherit\">Minecraft 26.1.2 `CraftingMenu`</a></span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Comments added to understand how the method works</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">@</span><span style=\"--0:#F97583;--1:#BF3441\">Override</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#F97583;--1:#BF3441\">public</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack </span><span style=\"--0:#B392F0;--1:#6F42C1\">quickMoveStack</span><span style=\"--0:#E1E4E8;--1:#24292E\">(Player player, </span><span style=\"--0:#F97583;--1:#BF3441\">int</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Setup variables</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ItemStack clicked </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">Slot slot </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.slots.</span><span style=\"--0:#B392F0;--1:#6F42C1\">get</span><span style=\"--0:#E1E4E8;--1:#24292E\">(slotIndex);</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot has an item to move...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slot </span><span style=\"--0:#F97583;--1:#BF3441\">!=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">hasItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">()) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Get the stack to move</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ItemStack stack </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Keep track of the original stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">clicked </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">copy</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot is the crafting result...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> RESULT_SLOT) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// On stack crafted</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">().</span><span style=\"--0:#B392F0;--1:#6F42C1\">onCraftedBy</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, player);</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player slots, starting from the hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">true</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Slot behavior on moving the crafting result</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">onQuickCraft</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, clicked);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, if the clicked slot is in the player slots...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&gt;=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> INV_SLOT_START </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&lt;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> USE_ROW_SLOT_END) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the crafting inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, CRAFT_SLOT_START, CRAFT_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// If the stack can't be moved into the crafting inventory...</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot is in the player inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&lt;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> INV_SLOT_END) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                    </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                    </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, USE_ROW_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                        </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                        </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">                    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">                </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, since the clicked slot is in the player hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, INV_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                    </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">                </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise try to move stack into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If all items in the stack was successfully moved...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">isEmpty</span><span style=\"--0:#E1E4E8;--1:#24292E\">()) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Clear the original slot the stack was in</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">setByPlayer</span><span style=\"--0:#E1E4E8;--1:#24292E\">(ItemStack.EMPTY);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, mark that the contents of the slot have changed</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">setChanged</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the slot's contents haven't changed</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getCount</span><span style=\"--0:#E1E4E8;--1:#24292E\">() </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getCount</span><span style=\"--0:#E1E4E8;--1:#24292E\">()) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Slot behavior on stack move</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">onTake</span><span style=\"--0:#E1E4E8;--1:#24292E\">(player, stack);</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot is the crafting result</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> RESULT_SLOT) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Drop the remaining stack into the level</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">player.</span><span style=\"--0:#B392F0;--1:#6F42C1\">drop</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Return the original clicked stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"// From Minecraft 26.1.2 `CraftingMenu`// Comments added to understand how the method works@Overridepublic ItemStack quickMoveStack(Player player, int slotIndex) {    // Setup variables    ItemStack clicked = ItemStack.EMPTY;    Slot slot = this.slots.get(slotIndex);    // If the clicked slot has an item to move...    if (slot != null &amp;&amp; slot.hasItem()) {        // Get the stack to move        ItemStack stack = slot.getItem();        // Keep track of the original stack        clicked = stack.copy();        // If the clicked slot is the crafting result...        if (slotIndex == RESULT_SLOT) {            // On stack crafted            stack.getItem().onCraftedBy(stack, player);            // Try to move stack into the player slots, starting from the hotbar            if (!this.moveItemStackTo(stack, INV_SLOT_START, USE_ROW_SLOT_END, true)) {                // Return if the stack can't be moved into the player slots                return ItemStack.EMPTY;            }            // Slot behavior on moving the crafting result            slot.onQuickCraft(stack, clicked);        }        // Otherwise, if the clicked slot is in the player slots...        else if (slotIndex >= INV_SLOT_START &amp;&amp; slotIndex < USE_ROW_SLOT_END) {            // Try to move stack into the crafting inventory            if (!this.moveItemStackTo(stack, CRAFT_SLOT_START, CRAFT_SLOT_END, false)) {                // If the stack can't be moved into the crafting inventory...                // If the clicked slot is in the player inventory                if (slotIndex < INV_SLOT_END) {                    // Try to move stack into the player hotbar                    if (!this.moveItemStackTo(stack, USE_ROW_SLOT_START, USE_ROW_SLOT_END, false)) {                        // Return if the stack can't be moved into the player hotbar                        return ItemStack.EMPTY;                    }                }                // Otherwise, since the clicked slot is in the player hotbar                // Try to move stack into the player inventory                else if (!this.moveItemStackTo(stack, INV_SLOT_START, INV_SLOT_END, false)) {                    // Return if the stack can't be moved into the player inventory                    return ItemStack.EMPTY;                }            }        }        // Otherwise try to move stack into the player slots        else if (!this.moveItemStackTo(stack, INV_SLOT_START, USE_ROW_SLOT_END, false)) {            // Return if the stack can't be moved into the player slots            return ItemStack.EMPTY;        }        // If all items in the stack was successfully moved...        if (stack.isEmpty()) {            // Clear the original slot the stack was in            slot.setByPlayer(ItemStack.EMPTY);        }        else {            // Otherwise, mark that the contents of the slot have changed            slot.setChanged();        }        // If the slot's contents haven't changed        if (stack.getCount() == clicked.getCount()) {            return ItemStack.EMPTY;        }        // Slot behavior on stack move        slot.onTake(player, stack);        // If the clicked slot is the crafting result        if (slotIndex == RESULT_SLOT) {            // Drop the remaining stack into the level            player.drop(stack, false);        }    }    // Return the original clicked stack    return clicked;}\"><div></div></button></div></figure></div>\n<p>This was my original understanding of how <code>quickMoveStack</code> worked. There were some differences depending on the backing inventory and menu, but the structure remained more or less the same. I didn't really think more about it at the time, and it was sitting that way across docs and other mod projects for a decade.</p>\n<p>Well, until two days ago.</p>\n<p>On March 21 2026, <a href=\"https://github.com/CelDaemon\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Celeste</a> made a comment on the Fabric Discord on one particular part on the <code>quickMoveStack</code> logic saying that the following didn't make much sense.</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getCount</span><span style=\"--0:#E1E4E8;--1:#24292E\">() </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getCount</span><span style=\"--0:#E1E4E8;--1:#24292E\">()) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack.EMPTY;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"if (stack.getCount() == clicked.getCount()) {    return ItemStack.EMPTY;}\"><div></div></button></div></figure></div>\n<p>I responded with, \"Why not? The original stack can be modified in <code>moveItemStackTo</code> right? I'm pretty sure it's to prevent <code>onTake</code> from being called if nothing was taken\" since that was how I understood the method to work. I would've stopped thinking about it right there, but then, Celeste responded with something interesting:</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#e1e4e8;--1:#24292e\">though honestly, I can't seem to find a way to reach that case at all</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"though honestly, I can't seem to find a way to reach that case at all\"><div></div></button></div></figure></div>\n<p>...well, that's strange.</p>\n<p>So, I tried to trigger it myself. Normal quick move, moving with multiple stacks, modifying the stack size in the player data, etc. However, no matter what I did, nothing worked, the same as Celeste. At this point, there was only one reasonable thing to do:</p>\n<p>Backtrace the addition through previous Minecraft versions to find why it was added.</p>\n<p>So modifying an old gradle workspace with the following buildscript:</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">plugins</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">id</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#9ECBFF;--1:#032F62\">\"fabric-loom\"</span><span style=\"--0:#E1E4E8;--1:#24292E\">) version </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"1.10-SNAPSHOT\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">group </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"net.ashwork.mc\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">version </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"0.0.0\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">base.archivesName </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"legacy\"</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">loom</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">noIntermediateMappings</span><span style=\"--0:#E1E4E8;--1:#24292E\">()</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">clientOnlyMinecraftJar</span><span style=\"--0:#E1E4E8;--1:#24292E\">()</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">dependencies</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">minecraft</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#9ECBFF;--1:#032F62\">\"com.mojang:minecraft:&lt;minecraft_version&gt;\"</span><span style=\"--0:#E1E4E8;--1:#24292E\">)</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">mappings</span><span style=\"--0:#E1E4E8;--1:#24292E\">(loom.</span><span style=\"--0:#B392F0;--1:#6F42C1\">layered</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// No mappings required</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">})</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#B392F0;--1:#6F42C1\">modImplementation</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#9ECBFF;--1:#032F62\">\"net.fabricmc:fabric-loader:0.16.14\"</span><span style=\"--0:#E1E4E8;--1:#24292E\">)</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">tasks.</span><span style=\"--0:#B392F0;--1:#6F42C1\">withType</span><span style=\"--0:#E1E4E8;--1:#24292E\">&lt;</span><span style=\"--0:#B392F0;--1:#6F42C1\">JavaCompile</span><span style=\"--0:#E1E4E8;--1:#24292E\">&gt; {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">options.release </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">8</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">options.encoding </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#9ECBFF;--1:#032F62\">\"UTF-8\"</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#B392F0;--1:#6F42C1\">java</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">sourceCompatibility </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> JavaVersion.VERSION_1_8</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">targetCompatibility </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> JavaVersion.VERSION_1_8</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"plugins {    id(&quot;fabric-loom&quot;) version &quot;1.10-SNAPSHOT&quot;}group = &quot;net.ashwork.mc&quot;version = &quot;0.0.0&quot;base.archivesName = &quot;legacy&quot;loom {    noIntermediateMappings()    clientOnlyMinecraftJar()}dependencies {    minecraft(&quot;com.mojang:minecraft:<minecraft_version>&quot;)    mappings(loom.layered {        // No mappings required    })    modImplementation(&quot;net.fabricmc:fabric-loader:0.16.14&quot;)}tasks.withType<JavaCompile> {    options.release = 8    options.encoding = &quot;UTF-8&quot;}java {    sourceCompatibility = JavaVersion.VERSION_1_8    targetCompatibility = JavaVersion.VERSION_1_8}\"><div></div></button></div></figure></div>\n<p>Let's look at the original code added in b1.5:</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// From </span><span style=\"--0:#99A0A6;--1:#616972\"><a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.5\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"ec-link\" style=\"color:inherit\">Minecraft b1.5</a></span><span style=\"--0:#99A0A6;--1:#616972\"> `do`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#F97583;--1:#BF3441\">public</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ii </span><span style=\"--0:#B392F0;--1:#6F42C1\">a</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#F97583;--1:#BF3441\">int</span><span style=\"--0:#E1E4E8;--1:#24292E\"> i) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ge var2 </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (ge) </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.e.</span><span style=\"--0:#B392F0;--1:#6F42C1\">get</span><span style=\"--0:#E1E4E8;--1:#24292E\">(i);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> var2 </span><span style=\"--0:#F97583;--1:#BF3441\">!=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">?</span><span style=\"--0:#E1E4E8;--1:#24292E\"> var2.</span><span style=\"--0:#B392F0;--1:#6F42C1\">a</span><span style=\"--0:#E1E4E8;--1:#24292E\">() </span><span style=\"--0:#F97583;--1:#BF3441\">:</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"// From Minecraft b1.5 `do`public ii a(int i) {    ge var2 = (ge) this.e.get(i);    return var2 != null ? var2.a() : null;}\"><div></div></button></div></figure></div>\n<p>...well that's not clear whatsoever. Which makes sense -- the Minecraft codebase was still obfuscated during the period. There are some mappings through the <a href=\"https://github.com/OrnitheMC/feather\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Feather</a> project, but I ended up going with the old 'translate it myself' approach. A bit of nostalgia from the SRG and Parchment mapping days.</p>\n<p>For ease of understanding, I'll be translating the codebase into its modern Mojang mapping equivalent along with providing the original signature if you want to look up the methods yourself.</p>\n<p>So, let's take another look at the b1.5 method:</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// From </span><span style=\"--0:#99A0A6;--1:#616972\"><a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.5\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"ec-link\" style=\"color:inherit\">Minecraft b1.5</a></span><span style=\"--0:#99A0A6;--1:#616972\"> `AbstractContainerMenu`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Comments added to understand how the method works</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Translated with their equivalent Mojang mappings</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Original signature: `do a(I)Lii;`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#F97583;--1:#BF3441\">public</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack </span><span style=\"--0:#B392F0;--1:#6F42C1\">quickMoveStack</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#F97583;--1:#BF3441\">int</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Setup variables</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">Slot slot </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (Slot) </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.slots.</span><span style=\"--0:#B392F0;--1:#6F42C1\">get</span><span style=\"--0:#E1E4E8;--1:#24292E\">(slotIndex);</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// If the slot exists, get the item in the slot</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, return an empty stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot </span><span style=\"--0:#F97583;--1:#BF3441\">!=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">?</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">() </span><span style=\"--0:#F97583;--1:#BF3441\">:</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"// From Minecraft b1.5 `AbstractContainerMenu`// Comments added to understand how the method works// Translated with their equivalent Mojang mappings// Original signature: `do a(I)Lii;`public ItemStack quickMoveStack(int slotIndex) {    // Setup variables    Slot slot = (Slot) this.slots.get(slotIndex);    // If the slot exists, get the item in the slot    // Otherwise, return an empty stack    return slot != null ? slot.getItem() : null;}\"><div></div></button></div></figure></div>\n<blockquote>\n<p>Some IDEs may fail to open the file as the obfuscated name of the class <code>do</code> is a keyword. I got around this in IntelliJ IDEA by right-clicking the class and selecting 'Open in Right Split'.</p>\n</blockquote>\n<p>Now you might be wondering why I'm showing the <code>AbstractContainerMenu</code> method instead of the <code>CraftingMenu</code> override. Well, it's because <code>CraftingMenu</code> (or <code>ie</code> obfuscated) didn't override <code>quickMoveStack</code> when it was first implemented. Nowadays, all menus have to implement <code>quickMoveStack</code> as an abstract method, much different than before.</p>\n<p>Well, regardless, what we're looking for hasn't been implemented yet, so let's jump up a version:</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// From </span><span style=\"--0:#99A0A6;--1:#616972\"><a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.6\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"ec-link\" style=\"color:inherit\">Minecraft b1.6</a></span><span style=\"--0:#99A0A6;--1:#616972\"> `CraftingMenu`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Translated with their equivalent Mojang mappings</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Original signature: `iq a(I)Liw;`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#F97583;--1:#BF3441\">public</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack </span><span style=\"--0:#B392F0;--1:#6F42C1\">quickMoveStack</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#F97583;--1:#BF3441\">int</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Setup variables</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ItemStack clicked </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">Slot slot </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (Slot) </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.slots.</span><span style=\"--0:#B392F0;--1:#6F42C1\">get</span><span style=\"--0:#E1E4E8;--1:#24292E\">(slotIndex);</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot has an item to move...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slot </span><span style=\"--0:#F97583;--1:#BF3441\">!=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">hasItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">()) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Get the stack to move</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ItemStack stack </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Keep track of the original stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">clicked </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">copy</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot is the crafting result...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> RESULT_SLOT) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player slots, starting from the hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">true</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, if the clicked slot is in the player inventory...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&gt;=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> INV_SLOT_START </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&lt;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> INV_SLOT_END) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, USE_ROW_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, if the clicked slot is in the player hotbar...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&gt;=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> USE_ROW_SLOT_START </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&lt;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> USE_ROW_SLOT_END) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, INV_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise try to move stack into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If all items in the stack was successfully moved...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.count </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">0</span><span style=\"--0:#E1E4E8;--1:#24292E\">) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Clear the original slot the stack was in</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">setByPlayer</span><span style=\"--0:#E1E4E8;--1:#24292E\">((ItemStack) </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">} </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, mark that the contents of the slot have changed</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">setChanged</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the slot's contents haven't changed</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.count </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked.count) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Slot behavior on stack move</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">onTake</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Return the original clicked stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"// From Minecraft b1.6 `CraftingMenu`// Translated with their equivalent Mojang mappings// Original signature: `iq a(I)Liw;`public ItemStack quickMoveStack(int slotIndex) {    // Setup variables    ItemStack clicked = null;    Slot slot = (Slot) this.slots.get(slotIndex);    // If the clicked slot has an item to move...    if (slot != null &amp;&amp; slot.hasItem()) {        // Get the stack to move        ItemStack stack = slot.getItem();        // Keep track of the original stack        clicked = stack.copy();        // If the clicked slot is the crafting result...        if (slotIndex == RESULT_SLOT) {            // Try to move stack into the player slots, starting from the hotbar            this.moveItemStackTo(stack, INV_SLOT_START, USE_ROW_SLOT_END, true);        }        // Otherwise, if the clicked slot is in the player inventory...        else if (slotIndex >= INV_SLOT_START &amp;&amp; slotIndex < INV_SLOT_END) {            // Try to move stack into the player hotbar            this.moveItemStackTo(stack, USE_ROW_SLOT_START, USE_ROW_SLOT_END, false);        }        // Otherwise, if the clicked slot is in the player hotbar...        else if (slotIndex >= USE_ROW_SLOT_START &amp;&amp; slotIndex < USE_ROW_SLOT_END) {            // Try to move stack into the player inventory            this.moveItemStackTo(stack, INV_SLOT_START, INV_SLOT_END, false);        }        // Otherwise try to move stack into the player slots        else {            this.moveItemStackTo(stack, INV_SLOT_START, USE_ROW_SLOT_END, false);        }        // If all items in the stack was successfully moved...        if (stack.count == 0) {            // Clear the original slot the stack was in            slot.setByPlayer((ItemStack) null);        } else {            // Otherwise, mark that the contents of the slot have changed            slot.setChanged();        }        // If the slot's contents haven't changed        if (stack.count == clicked.count) {            return null;        }        // Slot behavior on stack move        slot.onTake(stack);    }    // Return the original clicked stack    return clicked;}\"><div></div></button></div></figure></div>\n<p>Now, this is looking much closer to the current <code>CraftingMenu</code>. There are, of course, a few things missing. For example, you can't move quick move items from the player slots to the crafting inventory. Or, if you're able to quick move from the crafting result that fills up the entire inventory, any items left in the crafting result will disappear into the aether.</p>\n<p>But with this, we can now see the original purpose of that count comparison: to prevent <code>onTake</code> from being called if the slot's contents haven't changed. In <a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.6\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">b1.6</a>, <code>AbstractContainerMenu.moveItemStackTo()</code> didn't originally have a return result indicating if some of the stack was moved successfully. As such, if the player tried to quick move from the with a full inventory, <code>onTake</code> would still be called, which depending on the <code>Slot</code>, could perform behavior it wasn't yet supposed to. So the count comparison acted as a gate to prevent the method from being called if nothing changed about the contents.</p>\n<p>Later on in <a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.8.1\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">b1.8.1</a>, the implementation was changed to:</p>\n<div class=\"expressive-code\"><figure class=\"frame\"><figcaption class=\"header\"></figcaption><pre tabindex=\"0\" class=\"codeBlockStandalone_MEMb thin-scrollbar codeBlockContainer_Ckt0 theme-code-block\" style=\"--prism-background-color:hsl(220, 13%, 18%);--prism-color:hsl(220, 14%, 71%)\"><code class=\"codeBlockLines_e6Vv\"><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// From </span><span style=\"--0:#99A0A6;--1:#616972\"><a href=\"https://minecraft.wiki/w/Java_Edition_Beta_1.8.1\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"ec-link\" style=\"color:inherit\">Minecraft b1.8.1</a></span><span style=\"--0:#99A0A6;--1:#616972\"> `CraftingMenu`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Translated with their equivalent Mojang mappings</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#99A0A6;--1:#616972\">// Original signature: `uf a(I)Lul;`</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#F97583;--1:#BF3441\">public</span><span style=\"--0:#E1E4E8;--1:#24292E\"> ItemStack </span><span style=\"--0:#B392F0;--1:#6F42C1\">quickMoveStack</span><span style=\"--0:#E1E4E8;--1:#24292E\">(</span><span style=\"--0:#F97583;--1:#BF3441\">int</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Setup variables</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ItemStack clicked </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">Slot slot </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (Slot) </span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.slots.</span><span style=\"--0:#B392F0;--1:#6F42C1\">get</span><span style=\"--0:#E1E4E8;--1:#24292E\">(slotIndex);</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot has an item to move...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slot </span><span style=\"--0:#F97583;--1:#BF3441\">!=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">hasItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">()) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Get the stack to move</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">ItemStack stack </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">getItem</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Keep track of the original stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">clicked </span><span style=\"--0:#F97583;--1:#BF3441\">=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> stack.</span><span style=\"--0:#B392F0;--1:#6F42C1\">copy</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the clicked slot is the crafting result...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> RESULT_SLOT) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player slots, starting from the hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">true</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, if the clicked slot is in the player inventory...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&gt;=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> INV_SLOT_START </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&lt;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> INV_SLOT_END) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, USE_ROW_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player hotbar</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, if the clicked slot is in the player hotbar...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&gt;=</span><span style=\"--0:#E1E4E8;--1:#24292E\"> USE_ROW_SLOT_START </span><span style=\"--0:#F97583;--1:#BF3441\">&amp;&amp;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> slotIndex </span><span style=\"--0:#F97583;--1:#BF3441\">&lt;</span><span style=\"--0:#E1E4E8;--1:#24292E\"> USE_ROW_SLOT_END) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Try to move stack into the player inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#F97583;--1:#BF3441\">!</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, INV_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player inventory</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">                </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise try to move stack into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (</span><span style=\"--0:#79B8FF;--1:#005CC5\">this</span><span style=\"--0:#E1E4E8;--1:#24292E\">.</span><span style=\"--0:#B392F0;--1:#6F42C1\">moveItemStackTo</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack, INV_SLOT_START, USE_ROW_SLOT_END, </span><span style=\"--0:#79B8FF;--1:#005CC5\">false</span><span style=\"--0:#E1E4E8;--1:#24292E\">)) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Return if the stack can't be moved into the player slots</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If all items in the stack was successfully moved...</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.count </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">0</span><span style=\"--0:#E1E4E8;--1:#24292E\">) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Clear the original slot the stack was in</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">setByPlayer</span><span style=\"--0:#E1E4E8;--1:#24292E\">((ItemStack) </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">} </span><span style=\"--0:#F97583;--1:#BF3441\">else</span><span style=\"--0:#E1E4E8;--1:#24292E\"> {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#99A0A6;--1:#616972\">// Otherwise, mark that the contents of the slot have changed</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">            </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">setChanged</span><span style=\"--0:#E1E4E8;--1:#24292E\">();</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// If the slot's contents haven't changed</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#F97583;--1:#BF3441\">if</span><span style=\"--0:#E1E4E8;--1:#24292E\"> (stack.count </span><span style=\"--0:#F97583;--1:#BF3441\">==</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked.count) {</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">            </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> </span><span style=\"--0:#79B8FF;--1:#005CC5\">null</span><span style=\"--0:#E1E4E8;--1:#24292E\">;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">        </span><span style=\"--0:#99A0A6;--1:#616972\">// Slot behavior on stack move</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">        </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">slot.</span><span style=\"--0:#B392F0;--1:#6F42C1\">onTake</span><span style=\"--0:#E1E4E8;--1:#24292E\">(stack);</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\"><span style=\"--0:#E1E4E8;--1:#24292E\">    </span></span><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div><div class=\"ec-line\"><div class=\"code\">\n</div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#99A0A6;--1:#616972\">// Return the original clicked stack</span></div></div><div class=\"ec-line\"><div class=\"code\"><span class=\"indent\">    </span><span style=\"--0:#F97583;--1:#BF3441\">return</span><span style=\"--0:#E1E4E8;--1:#24292E\"> clicked;</span></div></div><div class=\"ec-line\"><div class=\"code\"><span style=\"--0:#E1E4E8;--1:#24292E\">}</span></div></div></code></pre><div class=\"copy\"><div aria-live=\"polite\"></div><button title=\"Copy to clipboard\" data-copied=\"Copied!\" data-code=\"// From Minecraft b1.8.1 `CraftingMenu`// Translated with their equivalent Mojang mappings// Original signature: `uf a(I)Lul;`public ItemStack quickMoveStack(int slotIndex) {    // Setup variables    ItemStack clicked = null;    Slot slot = (Slot) this.slots.get(slotIndex);    // If the clicked slot has an item to move...    if (slot != null &amp;&amp; slot.hasItem()) {        // Get the stack to move        ItemStack stack = slot.getItem();        // Keep track of the original stack        clicked = stack.copy();        // If the clicked slot is the crafting result...        if (slotIndex == RESULT_SLOT) {            // Try to move stack into the player slots, starting from the hotbar            if (!this.moveItemStackTo(stack, INV_SLOT_START, USE_ROW_SLOT_END, true)) {                // Return if the stack can't be moved into the player slots                return null;            }        }        // Otherwise, if the clicked slot is in the player inventory...        else if (slotIndex >= INV_SLOT_START &amp;&amp; slotIndex < INV_SLOT_END) {            // Try to move stack into the player hotbar            if (!this.moveItemStackTo(stack, USE_ROW_SLOT_START, USE_ROW_SLOT_END, false)) {                // Return if the stack can't be moved into the player hotbar                return null;            }        }        // Otherwise, if the clicked slot is in the player hotbar...        else if (slotIndex >= USE_ROW_SLOT_START &amp;&amp; slotIndex < USE_ROW_SLOT_END) {            // Try to move stack into the player inventory            if (!this.moveItemStackTo(stack, INV_SLOT_START, INV_SLOT_END, false)) {                // Return if the stack can't be moved into the player inventory                return null;            }        }        // Otherwise try to move stack into the player slots        else if (this.moveItemStackTo(stack, INV_SLOT_START, USE_ROW_SLOT_END, false)) {            // Return if the stack can't be moved into the player slots            return null;        }        // If all items in the stack was successfully moved...        if (stack.count == 0) {            // Clear the original slot the stack was in            slot.setByPlayer((ItemStack) null);        } else {            // Otherwise, mark that the contents of the slot have changed            slot.setChanged();        }        // If the slot's contents haven't changed        if (stack.count == clicked.count) {            return null;        }        // Slot behavior on stack move        slot.onTake(stack);    }    // Return the original clicked stack    return clicked;}\"><div></div></button></div></figure></div>\n<p><code>moveItemStackTo</code> now returned if the stack was successfully moved. <code>quickMoveStack</code> then checked that result and, if the stack wasn't moved, exited early with the empty stack. This change functionally made the count comparison pointless as what it was checking for happened much earlier in the method. From there, the count comparison was copy-pasta-ed throughout different menus across the versions until the <code>quickMoveStack</code> we have today. Since the comparison always returns <code>false</code>, it doesn't affect game behavior whatsoever, and if it works, then who cares.</p>\n<p>With this discovery, I <a href=\"https://github.com/neoforged/Documentation/pull/348\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">removed it from the NeoForged docs</a>. After all, what's the point in having something that will never do anything?</p>\n<p>A very worthwhile four hour rabbit hole.</p>\n<p>Thanks again to <a href=\"https://github.com/CelDaemon\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"\">Celeste</a> for the initial discovery and investigation work.</p>",
            "url": "https://blog.ashwork.net/minecraft/2026/05/23/menu-stack-move",
            "title": "A Redundant Count Comparison in AbstractContainerMenu",
            "summary": "Did you know that when shift-clicking a stack within a GUI like a chest or dispenser, the stack will move from one inventory to the other? It's a feature that's been in the game since b1.5 and hasn't really changed much.",
            "date_modified": "2026-05-23T19:59:03.000Z",
            "author": {
                "name": "ChampionAsh5357",
                "url": "https://github.com/ChampionAsh5357"
            },
            "tags": []
        }
    ]
}