mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-01-04 15:41:30 +00:00
Fix effect zones
This commit is contained in:
@@ -70,9 +70,13 @@ public class NoiseEffectZone {
|
|||||||
private transient AtomicCache<NoiseProvider> provider = new AtomicCache<>();
|
private transient AtomicCache<NoiseProvider> provider = new AtomicCache<>();
|
||||||
private static double BLOCK = 1D / 256D;
|
private static double BLOCK = 1D / 256D;
|
||||||
|
|
||||||
public double filter(double x, double z, double noise)
|
public double filter(double x, double z, double noise) {
|
||||||
{
|
if (invertZone && distance2(x, z) < (blockRadius - (interpolationRadius * 5)) * (blockRadius - (interpolationRadius * 5)))
|
||||||
if(invertZone ? distance2(x, z) < (blockRadius + (interpolationRadius * 5)) * (blockRadius + + (interpolationRadius * 5)) : distance2(x, z) > (blockRadius + interpolationRadius) * (blockRadius + interpolationRadius))
|
{
|
||||||
|
return noise;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(distance2(x, z) > (blockRadius + (interpolationRadius * 5)) * (blockRadius + (interpolationRadius * 5)))
|
||||||
{
|
{
|
||||||
return noise;
|
return noise;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user