Closed ProgrammerDan closed 9 years ago
Can one of the admins verify this patch? Type 'ok to test' to test.
@WildWeazel @ttk2 squashed for @Maxopoly , otherwise unchanged.
ok to test
nice, I assume we want to put this in testing then?
Yes please El 1/8/2015 1:28 p. m., "ttk2" notifications@github.com escribió:
nice, I assume we want to put this in testing then?
— Reply to this email directly or view it on GitHub https://github.com/Civcraft/RealisticBiomes/pull/45#issuecomment-126904056 .
on civtest, write up a testing post and crosspost it to the sub.
so no one wants a testing post for this?
@Maxopoly I know you're super busy already, but mind carrying this over the line on the testing post? Thanks
I found a bug while reading again over it, I'll make a pullrequest to fix that first and then write a testing post tomorrow
if (isGreenhouseEnabled && block.getLightFromBlocks() == (MAX_LIGHT_INTENSITY - 1)) {
for( Vector vec : adjacentBlocks ) {
Material mat = block.getLocation().add(vec).getBlock().getType();
if( mat == Material.GLOWSTONE || mat == Material.REDSTONE_LAMP_ON ) {
rate *= greenhouseRate;
break;
}
}
}
else {
int sunlightIntensity;
if (block.getType().isTransparent()) {
sunlightIntensity = block.getLightFromSky();
} else {
sunlightIntensity = block.getRelative(BlockFace.UP).getLightFromSky();
}
// apply multiplier if the sunlight is not at maximum
if (sunlightIntensity < MAX_LIGHT_INTENSITY) {
rate *= notFullSunlightMultiplier;
if (needsSunlight) {
rate *= Math.pow((sunlightIntensity / MAX_LIGHT_INTENSITY), 3.0);
}
}
}
If green house is enabled and the block somehow gets a lightlevel of maximum-1, it can pass the glowstone check without actually having glowstone and without having the rate reduced by anything, because of light conditions.
Five squashed commits. Rebased against current master and merged.
The first commit's message is:
getRate() rewrite
This is the 2nd commit message:
Cleanup of unused stuff
Cleaned up and removed unused stuff for water irrigation and greenhouse_ignore_biome. Also changed getRate, so persistent plants dont use the base rate multiplier anymore (as intended)
This is the 3rd commit message:
Added additional checks for improved performance.
This is the 4th commit message:
Reworked getRate again and removed getBaseRate
This is the 5th commit message:
getRate rework