X-ray Hacks For Eaglercraft -

// Find the Block class instance in Eaglercraft's global exports const Block = window.eaglercraft.Block; const origGetRenderLayer = Block.prototype.getRenderLayer; Block.prototype.getRenderLayer = function(blockState) const id = blockState.getBlock().getId(); if (id !== 14 && id !== 15) // not gold or iron ore return RenderLayer.TRANSLUCENT; // force transparency return origGetRenderLayer(blockState); ; This is brittle – class names minify/obfuscate across versions. Replace block texture images (via Image URL override) with transparent PNGs for stone/dirt. Eaglercraft loads textures from .class assets, but you can monkeypatch TextureUtil.loadTexture :

const origLoad = TextureUtil.loadTexture; TextureUtil.loadTexture = function(resourceLocation, callback) resourceLocation.path.includes("dirt")) // Return transparent 16x16 canvas const canvas = document.createElement("canvas"); canvas.width = 16; canvas.height = 16; const ctx = canvas.getContext("2d"); ctx.clearRect(0, 0, 16, 16); callback(canvas); return; origLoad(resourceLocation, callback); ; | Issue | Explanation | |-------|-------------| | Server-side anti-X-ray (e.g., Paper’s oreobfuscator) | Hides ore positions on the server. X-ray client sees only fake stone. Eaglercraft servers often lack this, but public servers may have it. | | WebGL performance | Discarding fragments in shader can be fast, but hooking linkProgram may break if game reuses shaders. | | Eaglercraft version differences | 1.5.2 vs 1.8.8 have different shader structures. Write-up must target one. | | Detection | Server can detect modified shaders by checking render time or sending silent chunk updates. Rare in Eaglercraft servers. | 6. Complete Working Example (For Eaglercraft 1.8.8) Paste this into the browser console after the game loads, but before world join: x-ray hacks for eaglercraft

// Inside fragment shader main() if (color.rgb == vec3(0.5, 0.5, 0.5)) discard; // stone if (color.rgb == vec3(0.6, 0.6, 0.6)) discard; // dirt // Keep ore colors Only ores, caves, and entities remain visible. Method 2: Bytecode Patching via TeaVM Hooks Eaglercraft’s Block class is translated to JS. You can override the getRenderLayer() method: // Find the Block class instance in Eaglercraft's


You may also like