Upgrade not working
BernardoGrigiastro opened this issue ยท 2 comments
1.18 and 1.18.1
Upgrade doenst work and throws
[Server thread/FATAL]: Error executing task on Server java.lang.ClassCastException: class net.minecraft.class_2595 cannot be cast to class io.github.cyberanner.ironchests.blocks.blockentities.GenericChestEntity (net.minecraft.class_2595 and io.github.cyberanner.ironchests.blocks.blockentities.GenericChestEntity are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @51c693d) at io.github.cyberanner.ironchests.items.UpgradeItem.method_7884(UpgradeItem.java:63) ~[IronChests-1.5.2.jar:?] at net.minecraft.class_1799.method_7981(class_1799.java:241) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_3225.method_14262(class_3225.java:347) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_3244.method_12046(class_3244.java:1057) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_2885.method_12547(class_2885.java:30) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_2885.method_11054(class_2885.java:8) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_3738.run(class_3738.java:18) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:780) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:162) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:762) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:756) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.class_1255.method_18857(class_1255.java:134) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:741) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:688) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-minecraft-1.18.1-pre1-client.jar:?] at java.lang.Thread.run(Thread.java:833) [?:?]
every time you try
Hello, I've tried to replicate the bug in 1.18 as I am not supporting snapshots.
The bug appears to be manifesting only when trying to upgrade a vanilla chest to a copper chest.
Thanks for reporting it!
IronChests relies on the ChestBlockEntity class.
This with the 1.18 update has made the writeNbt method protected (previously public). As I cannot cast the ChestBlockEntity into a GenericChestEntity class. (Technically can avoid this, but the content of the chest would be lost in an upgrade)
I won't work on reintegrating the Wood to Copper upgrade yet, as Mojang might change that method again (as it happened with the last 3 updates.
I am pushing an update to disable the Wood to Copper Upgrade so that it doesn't throw an error.
The item will remain with a [WIP] warning until I find a fix. Players will be able to uncraft it if they have a mod that allows so.