Mods / No Ocean Translocators
Author: Burneddi
Side: Server
Created: Jan 22nd at 12:43 PM
Last modified: Jan 22nd at 12:55 PM
Downloads: 217
Follow Unfollow 12
Latest file for v1.20.1:
NoOceanTranslocators-1.0.1.zip
1-click install
In worlds that have large oceans, the other side of repaired translocators frequently ends up being in the middle of a huge ocean. This mod changes translocators to make that much less likely to happen.
How it works
When a translocator is repaired (in vanilla as well as this mod), it picks a random position within its search range (by default between 400 and 8000 blocks; configurable with the translocator distance config mod) and generates a chunk there that has 10x higher odds of containing a translocator. If the chunk ends up containing a translocator, a pair is created; if not, the translocator tries again next tick.
This mod modifies the behaviour so that only the terrain of the chunk is generated. Then the mod checks if the chunk's ocean map exceeds the configured threshold, and if yes, a new chunk is picked until a suitable one is found. Only after a suitable, non-oceanic chunk is found are the structures in the chunk generated, which (hopefully) means that no redundant translocators get created under the ocean because of the 10x higher odds thing mentioned above.
Configuration
The following options are configurable in NoOceanTranslocators.json:
- oceanThreshold: (0-255; default 128) Minimum value in ocean map to consider the chunk ocean. At 0, every chunk will be considered ocean. The default may still pick very shallow ocean chunks, but this should be rare.
- failMaxRangeIncrease: (default 200) Every time we generate a chunk that's in the ocean, increase the maximum search range of the translocator by this many blocks.
- failMinRangeIncrease: (default 0) Every time we generate a chunk that's in the ocean, increase the minimum search range of the translocator by this many blocks.
- oceanAcceptChance: (0.0-1.0; default 0.0) Every time we generate a chunk that's in the ocean, accept it anyway at these odds.
Enable the mod and load into a world once to initialize the config file with default values if it doesn't exist.
Configuration tips for different worlds
The default settings should be suitable for a world with reasonable ocean settings, e.g. 50% of the world being ocean. On such worlds, even if there are no suitable chunks in range, the translocator's search range will keep increasing until it picks a chunk that is not oceanic (e.g. on another "continent").
If you run this on a very oceanic world, the odds of hitting an acceptable chunk may be very low. For such worlds, consider setting failRangeIncrease to 0 to prevent the search range of the translocator ballooning very high, and setting oceanAcceptChance to a value such as 0.01 (1% of the time an oceanic chunk is accepted) to ensure that the translocator doesn't get stuck looking for a suitable chunk forever. You may also want to consider adjusting oceanThreshold up to e.g. 200 on such worlds.
Compatibility notes
This mod does a fairly invasive patch by replacing the entire implementation of one of the translocator's methods. This means that it's prone to breakage with future game versions. If you're from the future and this mod hasn't been updated for your game version, you should make extra sure that it still works either by testing or reading the relevant source code.
The following translocator-related mods are confirmed compatible at the time of writing:
- Translocator Engineering - Redux
- translocator distance config
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1.0.1 | 202 | Jan 22nd at 12:55 PM | Show | NoOceanTranslocators-1.0.1.zip | Install now | |
v1.0.0 | 15 | Jan 22nd at 12:45 PM | Show | NoOceanTranslocators-1.0.0.zip | Install now |