<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Replacing mc.currentScreen crashes the game]]></title><description><![CDATA[<p dir="auto">bad script</p>
<pre><code>/// api_version=2
var script = registerScript({
	name: "EpicFail",
	version: "2.0",
	authors: ["OrangeCat", "Katchum"]
});
var prf = ", "+script.scriptName + " v"+script.scriptVersion+ " by";
Java.type("java.util.Arrays").asList(script.scriptAuthors).forEach(function(e){
	prf += (e != script.scriptAuthors[0] ? ", " : " ") + e;
});
script.registerModule({
	name: script.scriptName,
	description: "tf" + prf,
	category: "Movement",
	tag: "sigma"
}, function (module) {
	var GuiChest = Java.type("net.minecraft.client.gui.inventory.GuiChest");
	var ContainerChest = Java.type("net.minecraft.inventory.ContainerChest");
	var IInventory = Java.type("net.minecraft.inventory.IInventory");
	module.on("update", function(e){
		var cr = mc.currentScreen;
		var cry = mc.thePlayer.openContainer;
		if(cr != null &amp;&amp; cr instanceof GuiChest){ // i fucking hate js
			var i = cr.lowerChestInventory;
			if(i instanceof IInventory){ // tf is this
				// get actual inventory is my method in java client, figure out how to get the correct inventory
				var rp = new (Java.extend(GuiChest))(mc.thePlayer.getActualInventory(), i){
					drawScreen: function(mouseX, mouseY, partialTicks){
						Chat.print("i forgor :skull:")
					}
				};
				var sc = mc.class.getDeclaredField("currentScreen");
				sc.setAccessible(true);
				sc.set(mc, rp);
			}
		}
	});
});
</code></pre>
<p dir="auto">here is the stack trace thing:<br />
<img src="/assets/uploads/files/1627113239203-c1f970e0-763a-40f1-bf44-e3637bdabe4d-imagen.png" alt="c1f970e0-763a-40f1-bf44-e3637bdabe4d-imagen.png" class=" img-fluid img-markdown" /><br />
aparently it makes the player null <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/customizations/b76fa4f6-158e-4fd3-b410-49af5882f4bd-axosad.png?v=866ab33d74c" class="not-responsive emoji emoji-customizations emoji--axosad" style="height:23px;width:auto;vertical-align:middle" title=":axosad:" alt="undefined" /></p>
]]></description><link>https://forum.liquidbounce.net/topic/2727/replacing-mc-currentscreen-crashes-the-game</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 23:29:50 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/2727.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Jul 2021 07:54:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Replacing mc.currentScreen crashes the game on Sat, 24 Jul 2021 08:07:57 GMT]]></title><description><![CDATA[<p dir="auto">i forgor <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f480.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--skull" style="height:23px;width:auto;vertical-align:middle" title=":skull:" alt="💀" /></p>
]]></description><link>https://forum.liquidbounce.net/post/21806</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/21806</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sat, 24 Jul 2021 08:07:57 GMT</pubDate></item><item><title><![CDATA[Reply to Replacing mc.currentScreen crashes the game on Sat, 24 Jul 2021 08:06:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/skiddermaster412" aria-label="Profile: skiddermaster412">@<bdi>skiddermaster412</bdi></a> you didn't use displayGuiScren method</p>
<p dir="auto"><a href="https://github.com/CzechHek/Core/blob/82457082bb5bd82b3abbad668d9667fae123407b/Scripts/InventoryManager.js#L230" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/CzechHek/Core/blob/82457082bb5bd82b3abbad668d9667fae123407b/Scripts/InventoryManager.js#L230</a></p>
]]></description><link>https://forum.liquidbounce.net/post/21805</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/21805</guid><dc:creator><![CDATA[CzechHek]]></dc:creator><pubDate>Sat, 24 Jul 2021 08:06:42 GMT</pubDate></item></channel></rss>