mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-03 08:26:11 +00:00
Fixed strongholds not generating properly.
This commit is contained in:
parent
7b93542014
commit
7dd1d3881a
@ -98,7 +98,7 @@ public class PlannedStructure {
|
|||||||
int zz = i.getPosition().getZ() + sz;
|
int zz = i.getPosition().getZ() + sz;
|
||||||
RNG rngf = new RNG(Cache.key(xx, zz));
|
RNG rngf = new RNG(Cache.key(xx, zz));
|
||||||
int offset = i.getPosition().getY() - startHeight;
|
int offset = i.getPosition().getY() - startHeight;
|
||||||
int height = 0;
|
int height;
|
||||||
|
|
||||||
if(i.getStructure().getStructure().getLockY() == -1) {
|
if(i.getStructure().getStructure().getLockY() == -1) {
|
||||||
if(i.getStructure().getStructure().getOverrideYRange() != null) {
|
if(i.getStructure().getStructure().getOverrideYRange() != null) {
|
||||||
|
@ -190,31 +190,33 @@ public interface EngineMantle extends IObjectPlacer {
|
|||||||
|
|
||||||
@ChunkCoordinates
|
@ChunkCoordinates
|
||||||
default void generateMatter(int x, int z, boolean multicore, ChunkContext context) {
|
default void generateMatter(int x, int z, boolean multicore, ChunkContext context) {
|
||||||
if(!getEngine().getDimension().isUseMantle()) {
|
synchronized(this) {
|
||||||
return;
|
if(!getEngine().getDimension().isUseMantle()) {
|
||||||
}
|
return;
|
||||||
|
|
||||||
int s = getRealRadius();
|
|
||||||
BurstExecutor burst = burst().burst(multicore);
|
|
||||||
MantleWriter writer = getMantle().write(this, x, z, s * 2);
|
|
||||||
for(int i = -s; i <= s; i++) {
|
|
||||||
for(int j = -s; j <= s; j++) {
|
|
||||||
int xx = i + x;
|
|
||||||
int zz = j + z;
|
|
||||||
burst.queue(() -> {
|
|
||||||
IrisContext.touch(getEngine().getContext());
|
|
||||||
getMantle().raiseFlag(xx, zz, MantleFlag.PLANNED, () -> {
|
|
||||||
MantleChunk mc = getMantle().getChunk(xx, zz);
|
|
||||||
|
|
||||||
for(MantleComponent k : getComponents()) {
|
|
||||||
generateMantleComponent(writer, xx, zz, k, mc, context);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
burst.complete();
|
int s = getRealRadius();
|
||||||
|
BurstExecutor burst = burst().burst(multicore);
|
||||||
|
MantleWriter writer = getMantle().write(this, x, z, s * 2);
|
||||||
|
for(int i = -s; i <= s; i++) {
|
||||||
|
for(int j = -s; j <= s; j++) {
|
||||||
|
int xx = i + x;
|
||||||
|
int zz = j + z;
|
||||||
|
burst.queue(() -> {
|
||||||
|
IrisContext.touch(getEngine().getContext());
|
||||||
|
getMantle().raiseFlag(xx, zz, MantleFlag.PLANNED, () -> {
|
||||||
|
MantleChunk mc = getMantle().getChunk(xx, zz);
|
||||||
|
|
||||||
|
for(MantleComponent k : getComponents()) {
|
||||||
|
generateMantleComponent(writer, xx, zz, k, mc, context);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
burst.complete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
default void generateMantleComponent(MantleWriter writer, int x, int z, MantleComponent c, MantleChunk mc, ChunkContext context) {
|
default void generateMantleComponent(MantleWriter writer, int x, int z, MantleComponent c, MantleChunk mc, ChunkContext context) {
|
||||||
|
@ -249,9 +249,9 @@ public class Mantle {
|
|||||||
*/
|
*/
|
||||||
@ChunkCoordinates
|
@ChunkCoordinates
|
||||||
public <T> void iterateChunk(int x, int z, Class<T> type, Consumer4<Integer, Integer, Integer, T> iterator) {
|
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;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
get(x >> 5, z >> 5).getOrCreate(x & 31, z & 31).iterate(type, iterator);
|
get(x >> 5, z >> 5).getOrCreate(x & 31, z & 31).iterate(type, iterator);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user