Fixed strongholds not generating properly.

This commit is contained in:
Vatuu 2022-10-28 22:01:23 +02:00
parent 7b93542014
commit 7dd1d3881a
No known key found for this signature in database
GPG Key ID: C6F07B79B2ED9150
3 changed files with 28 additions and 26 deletions

View File

@ -98,7 +98,7 @@ public class PlannedStructure {
int zz = i.getPosition().getZ() + sz;
RNG rngf = new RNG(Cache.key(xx, zz));
int offset = i.getPosition().getY() - startHeight;
int height = 0;
int height;
if(i.getStructure().getStructure().getLockY() == -1) {
if(i.getStructure().getStructure().getOverrideYRange() != null) {

View File

@ -190,6 +190,7 @@ public interface EngineMantle extends IObjectPlacer {
@ChunkCoordinates
default void generateMatter(int x, int z, boolean multicore, ChunkContext context) {
synchronized(this) {
if(!getEngine().getDimension().isUseMantle()) {
return;
}
@ -216,6 +217,7 @@ public interface EngineMantle extends IObjectPlacer {
burst.complete();
}
}
default void generateMantleComponent(MantleWriter writer, int x, int z, MantleComponent c, MantleChunk mc, ChunkContext context) {
mc.raiseFlag(c.getFlag(), () -> c.generateLayer(writer, x, z, context));

View File

@ -249,9 +249,9 @@ public class Mantle {
*/
@ChunkCoordinates
public <T> void iterateChunk(int x, int z, Class<T> type, Consumer4<Integer, Integer, Integer, T> iterator) {
if(!hasTectonicPlate(x >> 5, z >> 5)) {
/*if(!hasTectonicPlate(x >> 5, z >> 5)) {
return;
}
}*/
get(x >> 5, z >> 5).getOrCreate(x & 31, z & 31).iterate(type, iterator);
}