diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-06 16:29:41 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-12-06 16:29:41 +0800 |
commit | 6accfc8d22f8873040f347abaf45e9008686a203 (patch) | |
tree | f37fc08345f4eb162ce0e4d08c0c127d71552cbe /features/dungeonMap/index.js | |
parent | c6582418087392ffc81ac49db7a5ad8988815863 (diff) | |
download | SoopyV2-6accfc8d22f8873040f347abaf45e9008686a203.tar.gz SoopyV2-6accfc8d22f8873040f347abaf45e9008686a203.tar.bz2 SoopyV2-6accfc8d22f8873040f347abaf45e9008686a203.zip |
Make a utils thing at allows for human readable mappings
Diffstat (limited to 'features/dungeonMap/index.js')
-rw-r--r-- | features/dungeonMap/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index 12bd471..a57edfc 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -1,6 +1,7 @@ /// <reference types="../../../CTAutocomplete" /> /// <reference lib="es2015" /> import Feature from "../../featureClass/class"; +import { f, m } from "../../mappings/mappings"; const BufferedImage = Java.type("java.awt.image.BufferedImage") class DungeonMap extends Feature { @@ -120,11 +121,11 @@ class DungeonMap extends Feature { let mapData try { let item = Player.getInventory().getStackInSlot(8) - mapData = item.getItem().func_77873_a(item.getItemStack(), World.getWorld()); // ItemStack.getItem().getMapData() + mapData = item.getItem()[m.getMapData](item.getItemStack(), World.getWorld()); // ItemStack.getItem().getMapData() } catch (error) { } if(mapData){ - mapData.field_76203_h.forEach((icon, vec4b) => { + mapData[f.mapDecorations].forEach((icon, vec4b) => { let x = vec4b.func_176112_b() let y = vec4b.func_176113_c() let rot = vec4b.func_176111_d() @@ -148,7 +149,7 @@ class DungeonMap extends Feature { }); // console.log("has map data poggies") - let bytes = mapData.field_76198_e + let bytes = mapData[f.colors.MapData] let x = 0 let y = 0 @@ -157,7 +158,7 @@ class DungeonMap extends Feature { if(bytes[i] !== 0){ let j = bytes[i]&255 - let color = net.minecraft.block.material.MapColor.field_76281_a[j>>2].func_151643_b(j & 3); + let color = net.minecraft.block.material.MapColor[f.mapColorArray][j>>2][m.getMapColor](j & 3); mapImage.setRGB(x, y, color) newImage.setRGB(x, y, color) } |