mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Merge pull request #2473 from MellowArpeggiation/master
common worldgen cascade fixes (improved worldgen performance)
This commit is contained in:
commit
ab7c852d61
@ -576,8 +576,8 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
|
||||
if(WorldConfig.meteoriteSpawn > 0 && rand.nextInt(WorldConfig.meteoriteSpawn) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int x = i + rand.nextInt(16) + 8;
|
||||
int z = j + rand.nextInt(16) + 8;
|
||||
int y = world.getHeightValue(x, z) - rand.nextInt(10);
|
||||
if(y > 1) (new Meteorite()).generate(world, rand, x, y, z, false, false, false);
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ public class TileEntityCharger extends TileEntityLoadedBase implements IEnergyRe
|
||||
IBatteryItem battery = (IBatteryItem) stack.getItem();
|
||||
|
||||
long toCharge = Math.min(battery.getMaxCharge(stack) - battery.getCharge(stack), battery.getChargeRate());
|
||||
toCharge = Math.min(toCharge, power / 5);
|
||||
toCharge = Math.min(toCharge, Math.max(power / 5, 1));
|
||||
battery.chargeBattery(stack, toCharge);
|
||||
power -= toCharge;
|
||||
|
||||
|
||||
@ -88,8 +88,8 @@ public class DungeonToolbox {
|
||||
|
||||
private static WorldGenFlowers genFlowers = new WorldGenFlowers(null);
|
||||
public static void generateFlowers(World world, Random rand, int chunkX, int chunkZ, Block flower, int meta) {
|
||||
int x = chunkX + rand.nextInt(16);
|
||||
int z = chunkZ + rand.nextInt(16);
|
||||
int x = chunkX + rand.nextInt(16) + 8;
|
||||
int z = chunkZ + rand.nextInt(16) + 8;
|
||||
int y = world.getHeightValue(x, z);
|
||||
genFlowers.func_150550_a(flower, meta);
|
||||
genFlowers.generate(world, rand, x, y, z);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user