mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 15:56:27 +00:00
Chunk regeneration
This commit is contained in:
@@ -33,6 +33,8 @@ import com.volmit.iris.util.documentation.BlockCoordinates;
|
||||
import com.volmit.iris.util.documentation.ChunkCoordinates;
|
||||
import com.volmit.iris.util.hunk.Hunk;
|
||||
import com.volmit.iris.util.mantle.Mantle;
|
||||
import com.volmit.iris.util.mantle.MantleChunk;
|
||||
import com.volmit.iris.util.mantle.MantleFlag;
|
||||
import com.volmit.iris.util.parallel.BurstExecutor;
|
||||
import com.volmit.iris.util.parallel.MultiBurst;
|
||||
import org.bukkit.Chunk;
|
||||
@@ -189,7 +191,12 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
int xx = i + x;
|
||||
int zz = j + z;
|
||||
burst.queue(() -> {
|
||||
getComponents().forEach((f) -> generateMantleComponent(writer, xx, zz, f, c));
|
||||
MantleChunk mc = getMantle().getChunk(xx, zz);
|
||||
|
||||
for(MantleComponent k : getComponents())
|
||||
{
|
||||
generateMantleComponent(writer, xx, zz, k, c, mc);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -203,8 +210,8 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
}
|
||||
}
|
||||
|
||||
default void generateMantleComponent(MantleWriter writer, int x, int z, MantleComponent c, Consumer<Runnable> post) {
|
||||
getMantle().raiseFlag(x, z, c.getFlag(), () -> c.generateLayer(writer, x, z, post));
|
||||
default void generateMantleComponent(MantleWriter writer, int x, int z, MantleComponent c, Consumer<Runnable> post, MantleChunk mc) {
|
||||
mc.raiseFlag(c.getFlag(), () -> c.generateLayer(writer, x, z, post));
|
||||
}
|
||||
|
||||
@ChunkCoordinates
|
||||
@@ -274,4 +281,14 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
default boolean queueRegenerate(int x, int z)
|
||||
{
|
||||
return false; // TODO:
|
||||
}
|
||||
|
||||
default boolean dequeueRegenerate(int x, int z)
|
||||
{
|
||||
return false;// TODO:
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MantleJigsawComponent extends IrisMantleComponent {
|
||||
|
||||
public MantleJigsawComponent(EngineMantle engineMantle) {
|
||||
super(engineMantle, MantleFlag.JIGSAW);
|
||||
cng = NoiseStyle.STATIC.create(new RNG());
|
||||
cng = NoiseStyle.STATIC.create(new RNG(engineMantle.getEngine().getWorld().seed() + 24398848585L));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user