Removed Chance Correction for Nether Gateways
Removed code related to a correction factor that would compensate for gateway generation failing a lot more frequently in the Nether. We don't use that approach in the Nether anymore.
This commit is contained in:
parent
175fa41318
commit
06bb624cd0
1 changed files with 1 additions and 17 deletions
|
@ -79,25 +79,9 @@ public class GatewayGenerator implements IWorldGenerator
|
||||||
|
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
int attempts;
|
int attempts;
|
||||||
int correction;
|
|
||||||
boolean valid;
|
boolean valid;
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
DimLink link;
|
DimLink link;
|
||||||
NewDimData dimension;
|
NewDimData dimension;
|
||||||
|
|
||||||
//Check if we're generating things in the Nether
|
|
||||||
if (world.provider.dimensionId == NETHER_DIMENSION_ID)
|
|
||||||
{
|
|
||||||
//The terrain in the Nether makes it much harder for our gateway spawning algorithm to find a spot to place a gateway.
|
|
||||||
//Tests show that only about 15% of attempts succeed. Compensate for this by multiplying the chance of generation
|
|
||||||
//by a correction factor.
|
|
||||||
correction = NETHER_CHANCE_CORRECTION;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//No correction
|
|
||||||
correction = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Randomly decide whether to place a cluster of rifts here
|
//Randomly decide whether to place a cluster of rifts here
|
||||||
if (random.nextInt(MAX_CLUSTER_GENERATION_CHANCE) < properties.ClusterGenerationChance)
|
if (random.nextInt(MAX_CLUSTER_GENERATION_CHANCE) < properties.ClusterGenerationChance)
|
||||||
|
@ -136,7 +120,7 @@ public class GatewayGenerator implements IWorldGenerator
|
||||||
|
|
||||||
//Check if generating structures is enabled and randomly decide whether to place a Rift Gateway here.
|
//Check if generating structures is enabled and randomly decide whether to place a Rift Gateway here.
|
||||||
//This only happens if a rift cluster was NOT generated.
|
//This only happens if a rift cluster was NOT generated.
|
||||||
else if (random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance * correction &&
|
else if (random.nextInt(MAX_GATEWAY_GENERATION_CHANCE) < properties.GatewayGenerationChance &&
|
||||||
isStructureGenerationAllowed())
|
isStructureGenerationAllowed())
|
||||||
{
|
{
|
||||||
valid = false;
|
valid = false;
|
||||||
|
|
Loading…
Reference in a new issue