Code cleanup

This commit is contained in:
LemADEC 2017-03-04 20:53:06 +01:00
parent 369bbc746f
commit 64ffb9a712
2 changed files with 5 additions and 2 deletions

View file

@ -197,13 +197,16 @@ public class CelestialObject implements Cloneable {
* @return square distance to transition borders, 0 if we're in orbit of the object
*/
public double getSquareDistanceInParent(final int dimensionId, final double x, final double z) {
// are in another dimension?
if (dimensionId != parentDimensionId) {
return Double.POSITIVE_INFINITY;
}
// are we in orbit?
if ( (Math.abs(x - parentCenterX) <= borderRadiusX)
&& (Math.abs(z - parentCenterZ) <= borderRadiusZ) ) {
return 0.0D;
}
// do the maths
final double dx = Math.max(0.0D, Math.abs(x - parentCenterX) - borderRadiusX);
final double dz = Math.max(0.0D, Math.abs(z - parentCenterZ) - borderRadiusZ);
return dx * dx + dz * dz;

View file

@ -4,9 +4,9 @@ import net.minecraft.world.biome.BiomeGenBase;
public class BiomeSpace extends BiomeGenBase
{
public BiomeSpace(int par1)
public BiomeSpace(int biomeId)
{
super(par1);
super(biomeId);
this.theBiomeDecorator.treesPerChunk = 0;
//this.temperature = 1F;
this.theBiomeDecorator.flowersPerChunk = 0;