Areas (Forge)

Areas (Forge)

890k Downloads

Add Compatibility for Immersive Portals

NihilEntropy opened this issue ยท 8 comments

commented

It doesn't seem to spread/give message for Immersive Portals' Nether portals. They do by default have some sort of block embedded in their entity, so I could imagine looking for either the entity with an obsidian frame or the block.

commented

I've updated Nether Portal Spread to 3.4 to try to make them compatible, but because the mod adds its own portal block it's not possible at this moment without depending on it (which I don't want to do due to my own mod dev environment).

I have changed the mod to check if it's a portal block by using:
if (block instanceof NetherPortalBlock) { }

Immersive Portals can add compatibility by instead of extending "Block" for their portal block extending "NetherPortalBlock" and overwriting functions they don't want. So you might have some luck by opening an issue there with this information.

Thanks for using the mod!

commented

Hmm, perhaps a config for a list of portal blocks so you don't have to have a dependency. I could imagine this would allow future features like different spreads for different portals from mods to be easier. Immersive portals seems not to be extending NetherPortalBlock like you said, so I'll send that to them, but I feel it will be more difficult on their end.

commented

It's not that easy either unfortunately. Normal nether portals are created instantly, and Immersive Portals take a while to generate. I couldn't find a good way to know when the portal has finished processing and created, like an event.

commented

I don't know if it gives off any completion event but I do know the portal entities have nbt data, https://github.com/qouteall/ImmersivePortalsMod/wiki/Portal-Customization . It seems like a strange way to approach it but perhaps checking if the entity has the nether portal NBT tag for the reverse portal's UUID. Checking the entities out myself it would seem that when the portal is loading the entity is entity.immersive_portals.loading_indicator, and it gets replaced by entity.immersive_portals.general_breakable_portal. I don't know if it would be possible for you to make a check for the loading indicator. Perhaps any of this is helpful?

commented

Might be! I'll wait for an answer from the author of Immersive Portals first, but I'll do some research. Thanks!

commented

I know it might be extra work, especially when updating, but why not release a patch mod instead? A seperate little mod that requires both immersive portals and nether portal spread, and it overwrites what block is detected in order for the spread to begin, at least that's how i've seen the Skyrim modding community deal with such compatibility issues. Otherwise, just copy the mod over, and just change the lines of code that need the immersive portals and release it as a separate mod so you have a mod for people who want immersive portals with nether spread and those who prefer the vanilla portal.

commented

I know it might be extra work, especially when updating, but why not release a patch mod instead? A seperate little mod that requires both immersive portals and nether portal spread, and it overwrites what block is detected in order for the spread to begin, at least that's how i've seen the Skyrim modding community deal with such compatibility issues. Otherwise, just copy the mod over, and just change the lines of code that need the immersive portals and release it as a separate mod so you have a mod for people who want immersive portals with nether spread and those who prefer the vanilla portal.

Thanks for the suggestion. That's a possibility, but also needs a dependent on both mods, which is currently not possible in my dev environment. I know, maybe I should change it but I've found quite a good way to manage 100+ mods with minimal storage space/hassle :)

The author of Immersive Portals has replied and I'll give it another go when he updates.

commented

Version 4.4 adds the compatibility! Thanks for using the mod and opening the issue.

https://www.curseforge.com/minecraft/mc-mods/nether-portal-spread