PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Incompatibility with Immersive petroleum

ChiefLogan3010 opened this issue ยท 22 comments

commented

Upon loading a world with both Pneumaticraft and IP in 1.12.2, the game freezes while building terrain due to what seems to be an incompatibility with Pneumaticraft and IP oil. Does not cause a crash but here's the log:
latest.log
The relevant information appears at around line 920 if that helps. If this is an IP bug then let me know and I'll report it to the developer.
Thanks!

commented

Hmm, this should have been fixed some time back. Are you running the 0.1.0-47 build from CurseForge?

commented
22:59:56] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from PneumaticCraft: Repressurized (pneumaticcraft)

Caused by: java.lang.IllegalStateException: Oil fluid does not have a block associated with it. The fluid is owned by immersivepetroleum. This could be fixed by creating the world with having this mod loaded after PneumaticCraft. This can be done by adding a injectedDependencies.json inside the config folder containing: [{"modId": "immersivepetroleum","deps": [{"type":"after","target":"pneumaticcraft"}]}]

The problem here is that IP registers "oil" as a fluid, but doesn't register a block for it (if I remember right, IP oil doesn't actually exist as pools in the world?). But PNC:R does have oil pools as part of worldgen, and get really unhappy, as above, if it finds that oil has been registered as a fluid, without an associated block.

Try adding an injectedDependencies.json as suggested there; that should force PNC:R to load before IP, and register the oil block. This should resolve the problem; if so, we can look at hardcoding a "before" dependency into PNC:R. I think it's working for me here because PNC:R happens to be loading before IP in my dev instance - mod load order is pretty arbitrary and may depend on what other mods are in your instance.

commented

Another work-around would be prefixing the mod name with A0 or similar, like "A0-pressure... ".
That used to make it load said mod first. I used to do that in 1.10 at least.
Interestingly i had to do that with Immersive Petroleum back then.

(For the user to do, I do not mean that we should rename the mod to that :p)

commented

@Xiaminou do you have both Buildcraft and Immersive Petroleum installed?

I'll do some testing with Buildcraft installed and see what happens, but won't get a chance till tomorrow. Does Buildcraft still add oil as a physical in-world block (I'm guessing it does) ?

commented

Yes I have both, my guess is that Buildcraft is taking priority for the Oil which means that Immersive Petroleum doesn't have Oil anymore and therefore the previous compatibility fix is no longer valid.
It might be worth taking a look or asking how other mods have fixed that kind of issue, so you don't have to manually add compatibility for every single mod.

commented

It's not Immersive Petroleum, it's Buildcraft this time.

commented

@Xiaminou Open a new issue, Buildcraft just now released for 1.12, he couldn't have known that.

commented

It's not a different issue, I looked in his logs, he has buildcraft.
I just installed it and got the same error.
This issue needs to be renamed.

commented

@Xiaminou Oh, I thought you were the original author :P sorry, I thought he now has issues on 1.12 with BC.

commented

I've done some more testing, with both IP & BC installed.

  • If you add BC to an existing world (previously generated with just PNC:R and IP installed) things will break right now. It will refuse to start, with the "no block for oil" error.
  • If you create a new world with PNC:R, IP and BC already installed, everything appears to work fine, at least in my testing. PNC:R won't create oil (BC does that), diesel (IP does that) or lubricant (IP does that too), but it can make and use those fluids in the Refinery and Thermopneumatic plant. And BC oil (cool) does work in the Refinery. That works for me.

I'm also going to make a small change so that older worlds will be able to load up if you disable PNC:R oil worldgen (because then oil doesn't need to exist as a block for PNC:R). And I'm also adding that as a note in the startup error message, so you'll see something like this:

[09:18:37] [Server thread/ERROR] [pneumaticcraft]: Oil fluid does not have a block associated with it. The fluid is owned by [immersivepetroleum]. This might be fixable by creating the world with having this mod loaded after PneumaticCraft.
[09:18:37] [Server thread/ERROR] [pneumaticcraft]: This can be done by adding a injectedDependencies.json inside the config folder containing: [{"modId": "immersivepetroleum","deps": [{"type":"after","target":"pneumaticcraft"}]}]
[09:18:37] [Server thread/ERROR] [pneumaticcraft]: Alternatively, you can disable PneumaticCraft oil generation by setting 'D:oilGenerationChance=0.0' in the config file pneumaticcraft.cfg, and use the the oil from [immersivepetroleum].

followed by the IllegalStateException. At that point editing pneumaticcraft.cfg and setting D:oilGenerationChance=0.0 should let you get into your older world (although I make no guarantees about which versions of oil/diesel/lubricant will be available). In fact, setting oilGenerationChance to 0 will completely disable any oil worldgen and the oil block validation code that currently stops older worlds from loading.

c1ad200

commented

FYI, build 69(+) on http://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized/ contains the change I just mentioned. If you'd like to try that out, I'd be interested to know if & how it helps.

commented

Well, except for the fact that Oil is now pink it worked fine.

commented

@Xiaminou That's BC, all their liquids are untextured currently.

commented

No they're not.
2017-11-24_15 47 34

commented

@DeadSix27 you beat me to it :) I'd noticed that in testing too. Although I did also see some properly-textured BC oil geysers too. In any case, I do not believe any broken textures are the fault of PNC:R at this point.

commented

@Xiaminou the oil in your screenshot is from IP, not BC.

commented

Oh I wasn't saying it's PNC:R's fault, just pointing it out.

It's the only Oil there is and it's pink. Like I said, I don't know who's fault this is.

commented

@Xiaminou In the world, place a bucket. That's where they are untextured, not in JEI.
Try one of the upside down ones.

commented

Oh okay.

commented

In any case, I think we are in good shape now regarding interop (and I didn't need to add any mod-specific dependency information; I'd much rather modpack authors controlled that via injectedDependencies.json). Just to recap, here's the strategy PNC:R uses:

  • When fluids are registered (at preInit), PNC:R will check if a fluid of that name already exists. If so, it'll use that in its recipes, but warn that it may not exist in block form.
  • If the fluid doesn't exist already, PNC:R will register it, and also register a block for it (using the RegistryEvent.Register<Block> event, which happens between preInit and init).
  • If at world load time, the "oil" fluid has no associated block, PNC:R will either 1) stop the world loading if its oil worldgen is enabled, or 2) just carry on if oil worldgen is disabled (D:oilGenerationChance=0 in pneumaticcraft.cfg). In the case 1) it will also log messages about the user's options to resolve the problem.

The lack of block is only likely to be an issue if some mod loads before PNC:R and registers "oil" but does not register a block for it or a new oil-providing mod is added to a world that has already been created. In that case, either disable PNC:R's oil worldgen and use the other mod's oil, or use injectedDependencies.json to ensure PNC:R loads first and gets a chance to register its oil block.

If all that makes sense, I will see if I can publish this information somewhere that's easy to refer people to in case of future problems.

commented

As a side note to this, I'd like to add that, at the time I've extensively discussed with CPW about the best solution for handling this scenario, and this (simply logging the mod load instructions) was the best solution we could come up with. Not ideal, though.

commented

Closing this now, think we're as good as we can be on this one.