Block entity tag to allow hard crashes through
TelepathicGrunt opened this issue · 2 comments
My mod Bumblezone has an Essence Block that is a ticking block entity that spawns arena, manages and saves arena state, and unloads arena when done.
The problem is if it crashes somehow, Neruina will prevent a hard crash and possibly reset the block entity while the arena is still going. This breaks the arena as now it will never unload and the block entity no longer have the old state or is in an invalid state.
This is a big problem as my arena is made of unbreakable blocks in an attempt to prevent cheesing the arena. It can very easily trap players in essentially a box that they cannot exit without teleporting.
My ask is I want any crashes with my block entity to always be a hard crash as I really need that crash log ASAP to fix the issue and to also prevent the player getting trapped due to the game continuing in an invalid state for this block. The hard crash is ideal as otherwise, players will never report issues to me. Case in point, All of Everything just had this issue but never realized that the permanent arena they had was due to Neruina swallowing a crash and resetting the block or something. Now I am praying they can find the swallowed stacktrace in the log file
It shouldn’t be possible for Neruina to swallow any exceptions, they’re always logged and processed. I’ll add a black list but this doesn’t sound right.
Code flow here
Added a data-driven blacklist system, see https://github.com/Bawnorton/Neruina/wiki/Blacklist-Schema
What the crash looks like
com.bawnorton.neruina.exception.TickingException: Ticking exception not handled as handling for "minecraft:campfire" is blacklisted by "test:neruina/blacklist.json"
at knot//com.bawnorton.neruina.exception.TickingException.blacklisted(TickingException.java:19)
at knot//com.bawnorton.neruina.handler.TickHandler.safelyTickBlockEntity(TickHandler.java:204)
at knot//net.minecraft.class_2818$class_5563.wrapOperation$znl000$neruina$catchTickingBlockEntity$notTheCauseOfTickLag(class_2818.java:839)
at knot//net.minecraft.class_2818$class_5563.method_31703(class_2818.java:714)
at knot//net.minecraft.class_2818$class_5564.method_31703(class_2818.java:768)
at knot//net.minecraft.class_1937.method_18471(class_1937.java:491)
at knot//net.minecraft.class_3218.method_18765(class_3218.java:411)
at knot//net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1069)
at knot//net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:953)
at knot//net.minecraft.class_1132.method_3748(class_1132.java:114)
at knot//net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:713)
at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:292)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException
at knot//net.minecraft.class_3924.handler$znd000$neruina$throwError(class_3924.java:517)
at knot//net.minecraft.class_3924.method_31666(class_3924.java)
at knot//net.minecraft.class_3922.method_64781(class_3922.java:309)
at knot//net.minecraft.class_2818$class_5563.mixinextras$bridge$tick$7(class_2818.java)
at knot//com.bawnorton.neruina.handler.TickHandler.safelyTickBlockEntity(TickHandler.java:192)
... 11 more