summarize

This commit is contained in:
Huynh Tien 2021-11-10 09:05:40 +07:00
parent 283fa48f61
commit a665bccfe6
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ public class EntitiesPopulator extends BlockPopulator
// End
chances.put(Environment.THE_END, new Chances(this.getEntityMap(addon.getSettings().getEndBlocks()), addon.getSettings().getEndMainBlock()));
// Other settings
worldHeight = addon.getSettings().getWorldDepth() - 1;
worldHeight = addon.getSettings().getWorldDepth();
}
@ -68,7 +68,7 @@ public class EntitiesPopulator extends BlockPopulator
public void populate(World world, Random random, Chunk chunk)
{
int minHeight = world.getMinHeight();
int height = Math.min(world.getMaxHeight() - 1, worldHeight);
int height = Math.min(world.getMaxHeight(), worldHeight) - 1;
for (Map.Entry<EntityType, Pair<Double, Integer>> entry : chances.get(world.getEnvironment()).entityChanceMap.entrySet())
{

View File

@ -49,7 +49,7 @@ public class MaterialPopulator extends BlockPopulator
// End
chances.put(Environment.THE_END, new Chances(this.getMaterialMap(addon.getSettings().getEndBlocks()), addon.getSettings().getEndMainBlock()));
// Other settings
worldHeight = addon.getSettings().getWorldDepth() - 1;
worldHeight = addon.getSettings().getWorldDepth();
}
@ -63,7 +63,7 @@ public class MaterialPopulator extends BlockPopulator
public void populate(World world, Random random, Chunk chunk)
{
int minHeight = world.getMinHeight();
int height = Math.min(world.getMaxHeight() - 1, worldHeight);
int height = Math.min(world.getMaxHeight(), worldHeight) - 1;
Chances chances = this.chances.get(world.getEnvironment());
for (Map.Entry<Material, Pair<Double, Integer>> entry : chances.materialChanceMap.entrySet())