Support for snow from other mods
dexman545 opened this issue ยท 6 comments
Would it be possible to change Blocks.snow in StormObject.java to Material.snow so that mods that add their own snow will be populated on the ground? In a discussion with one of the TFC devs, this was theorized as a possible solution to Weather 2's storms not placing snow.
(http://terrafirmacraft.com/f/topic/6945-1710-technofirma-mod-pack/page-5#entry101107)
Thank you,
dex
Just made a commit that should fix this problem a bit c661d91 , though it might not be perfect.
- The fix assumes the mod snow uses metadata the same way vanilla snow does for snow height
- I still use Blocks.snow.canPlaceBlockAt to mimic vanilla snows requirements for allowing placement of snow
Both of those might not be an issue, depends, I haven't tested my code against TFC snow, since this feature is default off anyways due to the epic fps drops it causes I'm not too concerned about things breaking for most people.
I'll push out an update in the coming weeks, I have some plans to go over some other code that does leaf falling to improve performance.
Thank you very much. I've tested it in game with TFC installed, and snow does not place.
Hmm, while I could change parts that check for snow to check Material.snow, I couldn't change parts of my code that place the vanilla snow, I'd have to know TFC is installed and use their snow class instead of vanillas and supporting for that is a whole different story.
Would me still placing vanilla snow ontop of TFC snow after checking for the Material.snow instead of Blocks.snow work you think? Also if TFC adds partially piled snow (not full block) my code would likely replace that partial snow pile with a vanilla partial snow pile. Not sure if thats a problem or not.
Adding support for TFC would be great. From my understanding of TFC snow, it would probably overwrite it into vanilla snow, which may cause problems with thawing. TFC has it's own time and weather system, so it does not snow all year. From the looks of things, TFC checks for Material.snow when melting, so it should thaw out properly.
Just loaded a test world and tried to place the layers by hand, if you have TFC snow as the first layer, layering vanilla snow on top is possible, up to a full blocks height, but then it stops, and if you attempt to continue placing, it changes to vanilla snow, one layer high.
Other than this, the only other possible snow-related problems would be if a full block of snow forms (probably the vanilla snow block), TFC will not be able to melt it away, and with the high rate of storms/rain, players may get stuck with a huge amount of snow to shovel away in summer.
Thank you for the response, hopefully there will be a way to fix this.