9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-26 18:49:06 +00:00
This commit is contained in:
DanMB
2022-08-12 08:05:48 -07:00
parent 93421a1dc9
commit 3a4aac1ee4

View File

@@ -20,6 +20,7 @@ package com.volmit.iris.util.stream;
import com.volmit.iris.Iris;
import com.volmit.iris.core.loader.IrisData;
import com.volmit.iris.engine.data.cache.Cache;
import com.volmit.iris.engine.framework.Engine;
import com.volmit.iris.engine.object.IRare;
import com.volmit.iris.engine.object.IrisStyledRange;
@@ -531,6 +532,21 @@ public interface ProceduralStream<T> extends ProceduralLayer, Interpolated<T> {
ProceduralStream<?> getSource();
default void fillChunk(int x, int z, T[] c) {
if(c.length != 256) {
throw new RuntimeException("Not 256 Length for chunk get");
}
int xs = x << 4;
int zs = z << 4;
for(int i = 0; i < 16; i++) {
for(int j = 0; j < 16; j++) {
c[Cache.to1D(i+xs, j+zs, 0, 16, 16)] = get(i+xs, j+zs);
}
}
}
T get(double x, double z);
T get(double x, double y, double z);