"Could not find a part container" crash when part goes missing via e.g. CarryOn
GreyMario opened this issue ยท 3 comments
Issue type:
- ๐ Bug
Short description:
Using CarryOn to pick up network cable parts that are also containers will crash the game with a "Could not find a part container at position" error. May potentially be encounterable with other mods that aren't CarryOn; let's maybe try to not hard crash in this scenario.
Steps to reproduce the problem:
This should be achievable with any network cable that has an inventory slot (a Display Panel, a Tunnels Importer/Exporter, a Writer...). Pick it up using CarryOn's empty-handed shift-rightclick and watch it go boom.
Data below sourced from FTBTeam/FTB-Modpack-Issues#1217
Versions:
CarryOn: 1.18.2-1.17.0.8
InDy: 1.18.2-1.11.5
Log file:
java.lang.IllegalStateException: Could not find a part container at DimPos(level=minecraft:overworld, blockPos=BlockPos{x=76, y=76, z=51}, worldReference=null)
at org.cyclops.integrateddynamics.core.helper.PartHelpers.lambda$getPartContainerChecked$1(PartHelpers.java:102) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at net.minecraftforge.common.util.LazyOptional.orElseThrow(LazyOptional.java:281) ~[forge-1.18.2-40.1.67-universal.jar%23330!/:?] {re:mixin,re:classloading}
at org.cyclops.integrateddynamics.core.helper.PartHelpers.getPartContainerChecked(PartHelpers.java:102) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at org.cyclops.integrateddynamics.core.network.PartNetworkElement.getPartContainer(PartNetworkElement.java:82) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at org.cyclops.integrateddynamics.core.network.PartNetworkElement.getPartState(PartNetworkElement.java:127) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at org.cyclops.integrateddynamics.core.network.PartNetworkElement.getUpdateInterval(PartNetworkElement.java:147) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at org.cyclops.integrateddynamics.core.network.Network.update(Network.java:408) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at org.cyclops.integrateddynamics.core.TickHandler.onTick(TickHandler.java:73) ~[IntegratedDynamics-1.18.2-1.11.5.jar%23181!/:1.11.5] {re:classloading}
at net.minecraftforge.eventbus.ASMEventHandler_2403_TickHandler_onTick_TickEvent.invoke(.dynamic) ~[?:?] {}
Mind, I do think CarryOn should blacklist most InDy network component blocks on principle, but it would still be nice to dodge this hard crash if the situation ever comes up.
This problem has existed for a while: #443.
ID has no support for mods that move blocks in the non-vanilla way.
If that mod causes a crash, then that mod should be responsible for blacklisting ID blocks.