mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 12:09:07 +00:00
Cleanup
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
public abstract class A implements Runnable
|
||||
{
|
||||
public A()
|
||||
{
|
||||
J.a(this);
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public enum Axis
|
||||
{
|
||||
X(1, 0, 0),
|
||||
Y(0, 1, 0),
|
||||
Z(0, 0, 1);
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
|
||||
private Axis(int x, int y, int z)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public Vector positive()
|
||||
{
|
||||
return new Vector(x, y, z);
|
||||
}
|
||||
|
||||
public Vector negative()
|
||||
{
|
||||
return VectorMath.reverse(positive());
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
|
||||
public class BiomeDominance extends KMap<IrisBiome, Double>
|
||||
{
|
||||
private static final long serialVersionUID = 9055245062942178392L;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BiomeResult
|
||||
{
|
||||
private IrisBiome biome;
|
||||
private double distance;
|
||||
|
||||
public BiomeResult(IrisBiome biome, double distance)
|
||||
{
|
||||
this.biome = biome;
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
public boolean is(BiomeResult r)
|
||||
{
|
||||
return biome.getName().equals(r.biome.getName());
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface BorderCheck<T>
|
||||
{
|
||||
public T get(double x, double z);
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.volmit.iris.util;
|
||||
|
||||
public class Borders
|
||||
{
|
||||
public static <T> double getDistanceToBorder(double x, double z, int samples, double minRadius, double maxRadius, double jump, BorderCheck<T> check)
|
||||
{
|
||||
double offset = 0;
|
||||
double fract = 1;
|
||||
|
||||
for(double i = minRadius; i < maxRadius; i += jump * fract)
|
||||
{
|
||||
offset += jump / 3D;
|
||||
fract += 0.333;
|
||||
|
||||
if(isBorderWithin(x, z, samples, maxRadius, offset, check))
|
||||
{
|
||||
return minRadius;
|
||||
}
|
||||
}
|
||||
|
||||
return maxRadius;
|
||||
}
|
||||
|
||||
public static <T> boolean isBorderWithin(double x, double z, int samples, double radius, double offset, BorderCheck<T> check)
|
||||
{
|
||||
T center = check.get(x, z);
|
||||
double ajump = Math.toRadians(360D / (double) samples) + offset;
|
||||
|
||||
for(int i = 0; i < samples; i++)
|
||||
{
|
||||
double dx = M.sin((float) ajump * i) * radius;
|
||||
double dz = M.cos((float) ajump * i) * radius;
|
||||
|
||||
if(!center.equals(check.get(x + dx, z + dz)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user