Big Reactors

Big Reactors

11M Downloads

Objects break when chunk unloads

survaaki opened this issue ยท 8 comments

commented

In testing I find that both the Turbine and Reactors stop working when the chunk unloads. The particular test had the entire setup in a single chunk including all auxiliary pipes, pumps and wires.

When leaving and later returning to the reactor & turbine, they have both stopped working. Visually the reactor no longer has any fuel in the fuel rods.

Rightclicking the reactor controller with an empty hand does nothing. Rightclicking the Access Ports works, though adding more yellorium ingots does nothing. Removing and replacing the controller does nothing. The reactor still shows 'created' graphics when the controller is removed. Rightclicking the coolant ports toggles them between input & output.

Rightclicking the turbine controller with an empty hand gives "SERIOUS ERROR - server part @ -2154,67,-2598 has no controller!"

Removing and replacing the controller on the turbine does actually visually break the turbine, unlike the reactor which doesn't display an un-created reactor when you remove the controller.

After replacing the controller the turbine visually shows completion but now rightclicking the turbine controller gives "Turbines require exactly 1 rotor bearing - controller 1651718354". Removing and replacing the bearing visually breaks and repairs the turbine but rightclicking the controller simply repeats the message above.

Restarting the server causes everything to work normally again until the chunk unloads again then repeats as above

commented

I need more information about your server environment, as this does not reproduce for me with a regular Minecraft+Forge server. Are there any errors in your server logs when the chunk reloads?

commented

Nothing noted in the server logs when the chunk reloads.

I'll recreate with the only mods being Forge & BigReactors and see if I can replicate.

In the meantime, my config/BigReactors/BigReactors.cfg file. The changed from default parts commented with MAF marker.

# Configuration file

####################
# block
####################

block {
    I:LiquidCyaniteStill=1755
    I:LiquidYelloriumStill=1754
    I:MetalBlock=1763
    I:MultiblockCreativePart=1762
    I:ReactorControlRod=1753
    I:ReactorGlass=1757
    I:ReactorPart=1752
    I:ReactorRedstonePort=1759
    I:SmallMachine=1758
    I:TurbinePart=1760
    I:TurbineRotorPart=1761
    I:YelloriteOre=1750
    I:YelloriumFuelRod=1751
}


####################
# compatibility
####################

compatibility {
    # If true, automatically adds all unregistered ingots found as clonesof standard yellorium fuel
    B:autoAddUranium=true
}


####################
# general
####################

general {
    # MAF was true
    B:enableComedy=false
    B:enableMetallurgyFantasyMetalsInTurbines=false

    # MAF setting this to false crashes the server on turbine creation
    # ref https://github.com/erogenousbeef/BigReactors/issues/154
    B:registerCreativeMultiblockParts=true

    D:fuelUsageMultiplier=1.0
    I:maxReactorHeight=48
    I:maxReactorSize=32
    I:maxTurbineSize=16
    D:powerProductionMultiplier=1.0
    I:ticksPerRedstoneUpdate=20
}


####################
# item
####################

item {
    I:BucketCyanite=17752
    I:BucketYellorium=17751
    I:IngotYellorium=17750
}


####################
# recipes
####################

recipes {
    # MAF was false
    B:requireObsidianGlass=true
    B:requireSteelInsteadOfIron=true

    B:registerGraphiteCharcoalCraftingRecipes=false
    B:registerGraphiteCoalCraftingRecipes=false
    B:registerCharcoalForSmelting=true
    B:registerCoalForSmelting=true
    B:registerYelloriteSmeltToUranium=true
    B:registerYelloriumAsUranium=true
}


####################
# worldgen
####################

worldgen {
    B:GenerateYelloriteOre=true
    I:MaxYelloriteClustersPerChunk=5
    I:MaxYelloriteOrePerCluster=10
    I:YelloriteDimensionBlacklist <
     >
    I:YelloriteMaxY=50
    B:enableWorldGen=true
    B:enableWorldGenInNegativeDims=false
    B:enableWorldRegeneration=false
    I:userWorldGenVersion=0
}
commented

Hmm.. I set it up with no mods except BigReators and ForgeModLoader and I can replicate it instantly on a creative world.

Log files show nothing unusual.

I teleport to 100 100 100 and then back to the running reactor and turbine @ 9621 63 10202 and bingo, it's broken. See logs below when I rightclick the turbine controller:

[B#439]  2014-04-23 12:20:44 [INFO] [Minecraft-Server] [igmac: Teleported igmac to 100.5,100.5,100.5]
[B#439]  2014-04-23 12:20:44 [INFO] [Minecraft-Client] [CHAT] Teleported igmac to 100.5,100.5,100.5
[B#439]  2014-04-23 12:20:58 [INFO] [Minecraft-Server] [igmac: Teleported igmac to 9621.5,63.5,10202.5]
[B#439]  2014-04-23 12:20:58 [INFO] [Minecraft-Client] [CHAT] Teleported igmac to 9621.5,63.5,10202.5
[B#439]  2014-04-23 12:21:03 [INFO] [Minecraft-Client] [CHAT] SERIOUS ERROR - server part @ 9619, 64, 10198 has no controller!
commented

I'll put the config files back to vanilla and see if that is the issue on this one as well.

commented

Found it.

Modify forgeChunkLoading.cfg defaults section to read:

defaults {
    # Unloaded chunks can first be kept in a dormant cache for quicker
    # loading times. Specify the size (in chunks) of that cache here
    I:dormantChunkCacheSize=4000

The default value is 0. When set to 4000 it breaks the reactors & turbines.

commented

I'll need to investigate what that configuration variable does. I assume it's screwing with how chunks load/unload and how events get sent to those chunks, and, if so, it's probably a Forge bug.

Which version of Forge are you using?

commented

I'm using Forge 1.6.4-9.11.1.965-universal

commented

Yeah, looking at this, this isn't a solvable problem. Forge does not send any events or signals when a chunk is moved to/from the "dormant chunk cache", it seems, so there's no good way to handle saving/restoring multiblock chunk-spanning objects when it's in use.

I'm going to declare the dormantChunkCacheSize system incompatible.