Added Config Settings for Nether Gateways

Added config settings for the chance of generating a Rift Gateway in a
Nether Fortress. Also made it so that DD does not override Nether
Fortress generation if fortress gateways are disabled in some way.
This commit is contained in:
SenseiKiwi
2014-03-04 04:39:57 -04:00
parent 47f7e280a7
commit 93f2f6c701
4 changed files with 16 additions and 7 deletions

View File

@@ -43,7 +43,10 @@ public class EventHookContainer
@ForgeSubscribe(priority = EventPriority.LOW)
public void onMapGen(InitMapGenEvent event)
{
if (event.type == InitMapGenEvent.EventType.NETHER_BRIDGE)
// Replace the Nether fortress generator with our own only if any gateways would ever generate.
// This allows admins to disable our fortress overriding without disabling all gateways.
if (properties.FortressGatewayGenerationChance > 0 && properties.WorldRiftGenerationEnabled &&
event.type == InitMapGenEvent.EventType.NETHER_BRIDGE)
{
event.newGen = new DDNetherFortressGenerator();
}