9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-28 19:49:06 +00:00

Papi support

This commit is contained in:
Daniel Mills
2021-07-30 09:19:28 -04:00
parent 8ee39d3822
commit e1e0368f8c
4 changed files with 229 additions and 28 deletions

View File

@@ -36,6 +36,7 @@ import com.volmit.iris.util.scheduling.ChronoLatch;
import com.volmit.iris.util.scheduling.J;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.util.Vector;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@@ -65,6 +66,31 @@ public interface IrisAccess extends Hotloadable, DataProvider {
void printMetrics(CommandSender sender);
/**
* Ignores the world, just uses the position
* @param l the location
* @return the biome
*/
default IrisBiome getBiome(Location l)
{
return getBiome(l.toVector());
}
default IrisRegion getRegion(int x, int y, int z)
{
return getEngineAccess(y).getRegion(x, z);
}
default IrisRegion getRegion(Location l)
{
return getRegion(l.getBlockX(), l.getBlockY(), l.getBlockZ());
}
default IrisBiome getBiome(Vector l)
{
return getBiome(l.getBlockX(), l.getBlockY(), l.getBlockZ());
}
IrisBiome getBiome(int x, int y, int z);
IrisBiome getCaveBiome(int x, int y, int z);
@@ -266,4 +292,9 @@ public interface IrisAccess extends Hotloadable, DataProvider {
return v;
}
default double getHeight(Location l)
{
return getHeight(l.getBlockX(), l.getBlockY(), l.getBlockZ());
}
}