mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 15:26:28 +00:00
DANGER V+
This commit is contained in:
@@ -289,12 +289,12 @@ public interface ProceduralStream<T> extends ProceduralLayer, Interpolated<T> {
|
||||
return new To3DStream<T>(this);
|
||||
}
|
||||
|
||||
default ProceduralStream<T> cache2D(Engine engine, int size) {
|
||||
return new CachedStream2D<T>(engine, this, size);
|
||||
default ProceduralStream<T> cache2D(String name, Engine engine, int size) {
|
||||
return new CachedStream2D<T>(name, engine, this, size);
|
||||
}
|
||||
|
||||
default ProceduralStream<T> cache3D(Engine engine, int maxSize) {
|
||||
return new CachedStream3D<T>(engine, this, maxSize);
|
||||
default ProceduralStream<T> cache3D(String name, Engine engine, int maxSize) {
|
||||
return new CachedStream3D<T>(name, engine, this, maxSize);
|
||||
}
|
||||
|
||||
default <V> ProceduralStream<V> convert(Function<T, V> converter) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CachedStream2D<T> extends BasicStream<T> implements ProceduralStrea
|
||||
private final KCache<Long, T> cache;
|
||||
private final Engine engine;
|
||||
|
||||
public CachedStream2D(Engine engine, ProceduralStream<T> stream, int size) {
|
||||
public CachedStream2D(String name, Engine engine, ProceduralStream<T> stream, int size) {
|
||||
super();
|
||||
this.stream = stream;
|
||||
this.engine = engine;
|
||||
@@ -70,6 +70,11 @@ public class CachedStream2D<T> extends BasicStream<T> implements ProceduralStrea
|
||||
return cache.getSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public KCache<?, ?> getRawCache() {
|
||||
return cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxSize() {
|
||||
return cache.getMaxSize();
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CachedStream3D<T> extends BasicStream<T> implements ProceduralStrea
|
||||
private final KCache<BlockPosition, T> cache;
|
||||
private final Engine engine;
|
||||
|
||||
public CachedStream3D(Engine engine, ProceduralStream<T> stream, int size) {
|
||||
public CachedStream3D(String name, Engine engine, ProceduralStream<T> stream, int size) {
|
||||
super();
|
||||
this.stream = stream;
|
||||
this.engine = engine;
|
||||
@@ -65,6 +65,11 @@ public class CachedStream3D<T> extends BasicStream<T> implements ProceduralStrea
|
||||
return cache.getSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public KCache<?, ?> getRawCache() {
|
||||
return cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxSize() {
|
||||
return cache.getMaxSize();
|
||||
|
||||
Reference in New Issue
Block a user