Woot factory not forming in compact machine.
BobVonBob opened this issue ยท 3 comments
Compact Machines version: 4.0.0 alpha 8
Forge version: 36.0.15
The factory multiblock from Woot does not form in a compact machine, possibly related to this issue reported to Woot two months ago.
As stated by Ipsis, the issue with the other mod seems to be no world ticks in that void dimension which results in "frozen time" and breaks the Woot mod along with others attempted to be used in the void dimension. Compact Machines and its world most definitely still have world ticks, meaning theoretically the multiblock should form. I can look into the specific code for their mod later to see what problems may have caused it to not form in a Compact Machine.
I've had a look at this and as @SizableShrimp says it is not tick related - I am seeing the world ticks.
(I tested with a dev version of Woot and CM 4.0.0 alpha 8)
It looks like the factory reform will not get triggered by placing any of the factory blocks.
However if you replace the heart then the factory does form.
What seems to be happening is that in the multiblock forming routine, before I act on a block I call World.isBlockLoaded. This returns true outside the compact machine, but seems to be returning false inside.
This debug is from the world tick handler and I only recently added the isBlockLoaded check to that handler to avoid loading chunks unintentionally. (I use isBlockLoaded elsewhere in the mod but that is normally in TileEntity tick handlers)
I do see compactmachines:compact_world world tick events,
Compact Machine World
13:10:15.282 ipsis.woot.modules.factory.multiblock.MultiBlockTracker Server thread MultiBlockTracker blocks
13:10:15.282 ipsis.woot.modules.factory.multiblock.MultiBlockTracker Server thread MultiBlockTracker blocks ResourceKey[minecraft:dimension / minecraft:overworld] 1
Overworld
13:11:00.084 ipsis.woot.modules.factory.multiblock.MultiBlockTracker Server thread MultiBlockTracker blocks ResourceKey[minecraft:dimension / minecraft:overworld] 1
13:11:00.084 ipsis.woot.modules.factory.multiblock.MultiBlockTracker Server thread MultiBlockTracker block is loaded
13:11:00.084 ipsis.woot.modules.factory.multiblock.MultiBlockTracker Server thread MultiBlockTracker onHello
13:11:00.084 ipsis.woot.modules.factory.multiblock.Glue Server thread onHello: BlockPos{x=286, y=73, z=247} find master
I'm adding to a shared list of blocks when they are placed. But my world tick handler is running over that list of blocks as if they all apply to the current world that is is ticking.
I've rewritten my code and I now have Woot factories forming both inside and outside of Compact Machines.
So all my fault, nothing to do with Compact Machines - though I'm glad that it identified a really stupid mistake in Woot.