Enigmatica 2: Expert - Extended

Enigmatica 2: Expert - Extended

194k Downloads

[Suggestion] Command for Nether Portal Spread

steventopper opened this issue · 9 comments

commented

As a workaround to the issue of OTG preventing nether portals from being created in dimension 3 on servers, could a command be added to the do/portal_spread scripts to create or remove a 'portal' at the specified coordinates and dimension?

Looking at how do/portal_spread works, creating a nether portal just calls the updatePortal function, which takes the position the portal was ignited at and the dimension it was ignited in as parameters and creates the spreading part of the portal from there. Likewise, breaking a portal calls removePortal, which takes the dimension and portal ID (which can be reverse engineered from the coordinates, or just used as the command input) and removes the spreading part of the portal.

In theory, /portal_spread could just have two more subcommands, create and remove, that take the required parameters and call createPortal and removePortal respectively. This would let server operators be able to create spreadable nether portals to skyblock players who aren't able to create them via lighting a portal.

commented

Instead of making "walkarounds" of the problem, I would like to fix problem itself.

The problem:
Skyblock players cant lit up Nether portal.

To reproduce:

  1. Create normal OTG world
  2. TP to skyblock world /tpx 3
  3. Build and try to lit portal

(This is also working on single player, not only on server.)

1️⃣ For single player this is rare bug since happen only when player accidentally created OTG world instead of other ones, since skyblock guide point to create non-OTG one
2️⃣ This happens always if server folks share one server for Skyblockers and Normalers

What I already tried:

  • On case 1️⃣ i can just suggest to remove OTG, but cant for case 2️⃣
  • Removing mods/OpenTerrainGenerator/worlds/Void fixes the issue for new worlds, but it breaking old worlds, requiring manual editing of some files.

The whole problem somehow related to this commit and issues mentioned in it: c805c48

So, @steventopper , if you want to help, I would ask you to reverse-engineering OTG configs and source code to find where exactly it prevent registering the portal. I could write a mixin that prevent this functionality, I just don't know where.

commented

Fortunately a friend found the line pretty fast:
https://github.com/PG85/OpenTerrainGenerator/blob/1.12-OTG%2B/platforms/forge/src/main/java/com/pg85/otg/forge/events/dimensions/RightClickListener.java#L21
Changing that line to check for dimension 0 or dimension 3 instead should fix the issue, I think.

commented

Fortunately a friend found the line pretty fast: https://github.com/PG85/OpenTerrainGenerator/blob/1.12-OTG%2B/platforms/forge/src/main/java/com/pg85/otg/forge/events/dimensions/RightClickListener.java#L21 Changing that line to check for dimension 0 or dimension 3 instead should fix the issue, I think.

No, this may not work, since Minecraft registering fiering bedrock not only by right-clicking with Flint and Steel, but with any other fire making methods, such as natural fire spread on wood blocks or my own Sticks+Slabs implementation. There must be other place where it prevented.
Also you can see on this line that OTG cancel event ONLY if custom OTG portal is created, for example one with Prismarine.

Through, someone made a video on how to temporary fix the issue https://www.youtube.com/watch?v=oacWtUZf84U

commented

This would be the method that controls it, according to this issue: PG85/OpenTerrainGenerator#614
So instead of line 21 like I originally thought, changing line 26 to instead allow other custom portal methods would be the way to do it.

commented

No, you are wrong. This issue is related to custom OTG portals, not to vanilla Nether portal.
This is even pointed in issue:

I want players to be able to enter OTG worlds

enter OTG worlds

Custom OTG portals looks like this, and leads from Overworld / other OTG world <=> to Other OTG world. It frame defined in OTG configs and can be lit up only with Flint And Steel.
image

RightClickListener.java do nothing related to vanilla portals.

commented

My mistake; in 1.16+ OTG registers the End and Nether as OTG dimensions and handles their portals similarly, but it doesn't seem to do that in 1.12.

There doesn't seem to be any 1.12 checks or overrides for nether portals, so my conclusion is that OTG is not compatible with the nether in 1.12. You cannot make a portal from an OTG dimension to the nether, and you cannot create OTG portals in the nether. The only solution is to not have the Void be an OTG dimension, either by removing the mod or removing OTG's management of dimension 3.

I still think my original suggestion is a cool idea for the do/portal_spread datapack, since it allows the datapack to be used in more creative ways in other modpacks (for example, instead of spreading from a portal block, a command can be triggered when placing/breaking specific blocks to create/remove a portal in that position) but for this specific case, removing the dimension management of dimension 3 is all that can be done.

commented

You cannot make a portal from an OTG dimension to the nether

This is not true. If you create OTG overworld in E2EE you can create the Nether Portal with ease. Not only by Flint And Steel but any other means.

allows the datapack to be used

There is no datapacks in 1.12.2.

commented

Clarifying, I mean broadly OTG dimensions without an ID of 0. Nether portals can be created in an OTG dimension with an ID of 0. There doesn't seem to be explicit handling for this behavior in the mod, so I don't see how you can extend this behavior to other dimensions (i.e. 3).

And yes, my word choice is incorrect, do/portal_spread is a crafttweaker script. I don't think this changes my point in any way.

commented

Nether portals can be created in an OTG

Then I will continue my research to find the code that disabling this functionality.

a command can be triggered when placing/breaking specific blocks

For this, you can just copy-paste portal spreading code in your modpack.