#litematica causes game to crash after a while (NullPointerException)
WiktorOdoc opened this issue ยท 2 comments
Some information
Operating system: Windows 10
Java version: 17.0.3
Minecraft version: 1.19.2
Baritone version: baritone-standalone-fabric-1.9.4
Other mods : malilib-fabric-1.19.2-0.13.0, litematica-fabric-1.19.2-0.12.7
Exception, error or logs
latest.log
crash-2023-06-06_14.01.43-client.txt
How to reproduce
Load a large litematic and build with the #litematica command (I built this litematic (added .txt so I can attach here))
_MONUMENT1 - TILL LAMPS.litematic.txt
After a while which can be anywhere from 5 seconds to 30 minutes the game crashes.
Modified settings
allowInventory (Boolean) (tried with enabled and with disabled)
allowSprint (Boolean)
blockBreakAdditionalPenalty (Double)
blockPlacementPenalty (Double)
blockReachDistance (Float)
breakCorrectBlockPenaltyMultiplier (Double)
breakFromAbove (Boolean)
buildInLayers (Boolean)
dam it i hoped this would never come up.
first of all you have to blame me for this and i apologise for the inconvenience.
here is whats happening: your schematic has multiple subregions that but baritone only can handle 1 rectangular schematic. therefor baritone makes a cuboid that is big enough to encapsulate all subregions. this enclousing cuboid however has parts that arnt in the schematic so the "blocks" at this positions are "null". aslong as nobody wants anything to know about this positions that isnt a problem but as soon as someone does you get a nullpointer exception which will cascade and crashes the game.
how to fix it: short term fix, only use single selection schematics. long term fix i have to catch the nullpointer in order to not crash the game.
once again im sorry for the inconvenience.
has multiple subregions that but baritone only can handle 1 rectangular schematic. therefor baritone makes a cuboid that is big enough to encapsulate all subregions
Not exactly. This is what the .litematic
loading code does and not a restriction of the schematic system itself.
BuilderProcess
could be smarted about bulding CompositeSchematic
s though.