Carpenter's Blocks

Carpenter's Blocks

24M Downloads

CarpentersBlocksCachedResources JVM crash

sfPlayer1 opened this issue ยท 1 comments

commented

If I read it correctly, the class modifies a zip (jar) file which is likely already opened by mc's resource handling code. Once MC accesses the file again after it was changed, the JVM has a chance to hard crash in the libzip native code.

It has to be made absolutely sure that a zip file is not in use (opened) while modifying it. There's most likely a less hacky way that doesn't involve external files or resource packs to load dynamically generated content.

commented

There may be another way to do it, but this is what I came up with. The only peculiarity in the current implementation is the first time the mod is ran, the resource file usually won't get generated until you run the game a second time.