[1.12.2] [suggestion] Make Refined Obsidian usable for Nether Portals
ToMe25 opened this issue ยท 11 comments
How would this be implemented correctly? I do not recall other mods with similar portals.
Looked into how EnderIO handles the creation of infinity powder after burning bedrock:
(https://github.com/SleepyTrousers/EnderIO/blob/0ddbcce8cd9b5028bacfc8864a3ae039238053fd/enderio-base/src/main/java/crazypants/enderio/base/material/material/MaterialCraftingHandler.java)
We could also register to OnNeighbourNotify
event like them, and if event.getState().getBlock() instanceof BlockFire
then call net.minecraft.init.Blocks.PORTAL.trySpawnPortal(worldIn, pos)
(same way BlockFire
does spawn the portal) (and remove the fire if we were successful).
Is that the correct way to do it? If yes and this enhancement is approved to be implemented I can take a look at it ?
@Zajozor i don't know how to implement this correctly.
If i would know how to do that correctly i would have my own PR doing that.
Also you can't even ignite Refined Obsidian, the Fire only is client side there and only until the Server tells him he can't ignite that so it was kind of tricky to make this Screenshot, and you won't get a BlockFire there i guess.
Sorry, for being unclear, the question was rather aimed at @thiakil @pupnewfster .
Could you please give your opinion?
If you would like to see this implemented, and registering to OnNeighbourNotify
(similar to what I linked above) seems like a good idea I can take a look at this.
I am not really against this, though it does seem slightly pointless to me. One thing however that I remember reading for Random Portals is that they are unable to support Vanilla's nether portal activation event. Though that might just be because of them being horizontal instead of vertical. If this feature does get PR'd I would like to see the proper activation event be fired, and if it cannot I think then it is not necessarily worthwhile to implement, in terms of compatibility with other mods.
Edit: I am also unsure if listening to neighbor notify is even really needed, as we add the refined obsidian ourselves so we probably can just use one of the neighborChanged
methods directly for the block.
Does the neighborChanged method work for placing fire on it?
Also i guess first the Block needs to stop extinguishing fires on it.
I am pretty sure either nighborChanged
is for when the state changes on a specific side. So I believe it would get called for when it changes from air -> fire as that is a state change/block type change. Though if it does only get lit client side then maybe it doesn't. In which case
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
we would probably need to return true for the top face of refined obsidian blocks.
@Zajozor do you implement this?
If not i would think about implementing this.
Please feel free to not only think about it :) I do not have anything started regarding this issue and I consider it as being implemented by you from now.
sadly i can't fully implement this(atleast not now) as the Portal Blocks destroy themself on placed.
I think i got everything else to work so if anyone knows how to get that working i think i could finish it.
Edit: I think i could but only with huge amounts of ASM and much stuff you shouldn't do for compatibility reasons.