BleachDev / BleachHack

block game utility mod that makes you a cool kid
https://bleachhack.org
GNU General Public License v3.0
738 stars 132 forks source link

search block-edit crashing game #439

Closed sudofox closed 2 years ago

sudofox commented 2 years ago

Somehow my search settings got stuck in a state where opening the block editor would crash

---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 2/28/22, 1:24 PM
Description: Rendering screen

java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2248.method_8389()" because "item" is null
    at Not Enough Crashes deobfuscated stack trace.(1.17.1+build.63)
    at org.bleachhack.setting.module.SettingBlockList.renderItem(SettingBlockList.java:45)
    at org.bleachhack.setting.module.SettingBlockList.renderItem(SettingBlockList.java:27)
    at org.bleachhack.setting.module.SettingList$ListWidowScreen.drawEntry(SettingList.java:223)
    at org.bleachhack.setting.module.SettingList$ListWidowScreen.onRenderWindow(SettingList.java:172)
    at org.bleachhack.gui.window.WindowScreen.render(WindowScreen.java:115)
    at org.bleachhack.setting.module.SettingList$ListWidowScreen.render(SettingList.java:148)
    at net.minecraft.client.render.GameRenderer.render(GameRenderer:874)
    at net.minecraft.client.MinecraftClient.render(MinecraftClient:1112)
    at net.minecraft.client.MinecraftClient.run(MinecraftClient:728)
    at net.minecraft.client.main.Main.main(Main:217)
<snip>
"Search": {
    "settings": {
      "Fill": 0.39,
      "Edit Blocks": [
        "minecraft:air",
        "minecraft:cyan_shulker_box",
        "minecraft:purple_shulker_box",
        "minecraft:blue_shulker_box",
        "minecraft:brown_shulker_box",
        "minecraft:green_shulker_box",
        "minecraft:red_shulker_box",
        "minecraft:black_shulker_box",
        "minecraft:gray_shulker_box",
        "minecraft:pink_shulker_box",
        "minecraft:lime_shulker_box",
        "minecraft:yellow_shulker_box",
        "minecraft:light_blue_shulker_box",
        "minecraft:magenta_shulker_box",
        "minecraft:orange_shulker_box",
        "minecraft:white_shulker_box",
        "minecraft:shulker_box",
        "minecraft:barrier"
      ],
      "Box": 1.7,
      "Tracers": {
        "toggled": true,
        "children": {
          "Width": 1.6,
          "Opacity": 0.31
        }
      }
    }
  },

after wiping out the "Edit Blocks" setting in the json, i was able to start using it again. I reckon it's either the barrier or the air at fault, though for some reason adding those back now doesn't seem to instantly cause a crash when opening the menu.

BleachDev commented 2 years ago

Fixed in https://github.com/BleachDrinker420/BleachHack/commit/4029aa552bd3bbf2b7a8b8b4bce1d37a8807c79a