[1.12.2] Charcoal Pit Incompatibility
erindal opened this issue ยท 10 comments
Description of the issue:
Using an external heater and a furnace with Charcoal Pit causes a crash (I assume because charcoal pit makes changes to the vanilla furnace). This isn't super consistent and it didn't force crash my server the first time, it just logged it.
I'm not sure if this is even a fixable bug, but I figured I'd make it known.
Crashlog:
https://gist.github.com/erindalc/9326533479545895c7bf4cc5cfcd0a96 (When I had a furnace placed before adding charcoal pit)
https://gist.github.com/erindalc/ec7f360d2da2d8aa7869936987a80f4d (When I broke and replaced it)
Versions & Modlist
Forge 2756
IE 0.12-85
Charcoal Pit 1.20
okay from what i am seeing here, i got a strong "optimization" related assumption
IE does store all heatable elements and keeps a reference of the TE
the moment you convert it to a charcoalpit (i suppose some sort of multiblock, never dealt with the mod) you try to replace the block but somewhere goes something strange and the block is turned back into an actual furnace
then charcoalpit crashes because the block has turned back into an furnace ... maybe throwing in a few "a instanceof b" safeguards before actually casting the TE (this is a good thing to do in general)
this looks most likely to be a sideeffect/crossmod interaction in my eyes that can be dealt with but the crash as it is seems avoidable if guarded properly
(english is not my native language, this is not meant offensively by any means)
The charcoal pit github seems to be not updated, I'm unable to even find their custom furnace classes on their, so I can't really peak into the code to figure out what's wrong.
As far as I can tell, it's crashing on their side, but may be caused by IE. Since IE searches for instances of TileEntityFurnace, if the custom one extends it, IE may be calling some of its base methods, which in turn results in a crash.
If I had access to the source, I might be able to look into this further, but as it stands right now, all we could do is hardcode-disable the heater for the Charcoal Pit furnace
I had a look at the latest CharcoalPit build with ForgeFlower (it is licensed as GPLv3 on CF), their TE does not extend the vanilla one. In my testing I got exactly the behavior I'd expect, the external heater does nothing to the custom furnace. The first crash, according to the description, happened with a furnace placed before the custom furnace existed, causing it to not be replaced. I don't know about the second one, but I doubt it is caused by IE in any way.
I'll try and do some more in depth testing, both on the server I experienced it and in singleplayer.
Why would that happen? its not any different than placing a chest on it. Why would it think the custom furnace is a furnace? Its a different block. Maybe i could override the tile entity on the vanilla furnace somehow so its still a furnace.
@malte0811 I've used the furnace normally without problems since, so Crash 2 is definitely something with the external heater. Again I'll do more testing.
i tried to update the git but i've merged a pull request and it wont let me push. how do i sync it?
So I can't reproduce the bug on my server, I'm wondering if the second crash was caused by breaking and replacing the furnace but the not the external heater, and when I replaced the furnace I put it in the same place. So the heater thinks the furnace (the valid, vanilla one) is still there, but it's actually the one from charcoal pit.