9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2026-01-04 15:41:30 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Brian Neumann-Fopiano
79d6f34879 v+ 2024-08-03 14:42:07 -04:00
Julian Krings
ceb6c15c97 tall_seagrass isnt sticking out of water anymore
by RePixelatedMC
2024-08-03 18:45:44 +02:00
Julian Krings
7cf43ad7ab fix world creation 2024-08-03 18:04:37 +02:00
Julian Krings
ab3397a373 fix pack download command 2024-08-03 15:30:56 +02:00
Julian Krings
8e9f78e982 fix region zoom 2024-08-03 13:03:50 +02:00
Julian Krings
61bbfee640 Update README.md 2024-08-02 18:20:25 +02:00
11 changed files with 40 additions and 12 deletions

View File

@@ -30,14 +30,11 @@ Consider supporting our development by buying Iris on spigot! We work hard to ma
3. Add `export JAVA_HOME=$(/usr/libexec/java_home)` as a new line
4. Use `CTRL + X`, then Press `Y`, Then `ENTER`
5. Quit & Reopen Terminal and verify with `echo $JAVA_HOME`. It should print a directory
3. If this is your first time building Iris for MC 1.18+ run `gradlew setup` inside the root Iris project folder.
Otherwise, skip this step. Grab a coffee, this may take up to 45 minutes depending on your cpu & internet connection.
4. Once the project has setup, run `gradlew iris`
5. The Iris jar will be placed in `Iris/build/Iris-XXX-XXX.jar` Enjoy! Consider supporting us by buying it on spigot!
3. Once the project has setup, run `gradlew iris`
4. The Iris jar will be placed in `Iris/build/Iris-XXX-XXX.jar` Enjoy! Consider supporting us by buying it on spigot!
### IDE Builds (for development)
* Run `gradlew setup` any time you get dependency issues with craftbukkit
* Configure ITJ Gradle to use JDK 17 (in settings, search for gradle)
* Add a build line in the build.gradle for your own build task to directly compile Iris into your plugins folder if you
prefer.

View File

@@ -32,7 +32,7 @@ plugins {
id "de.undercouch.download" version "5.0.1"
}
version '3.4.0-1.19.2-1.21'
version '3.4.1-1.19.2-1.21'
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
// ======================== WINDOWS =============================

View File

@@ -120,4 +120,8 @@ public interface INMSBinding {
default DataVersion getDataVersion() {
return DataVersion.V1192;
}
default int getSpawnChunkCount(World world) {
return 441;
}
}

View File

@@ -232,7 +232,7 @@ public class StudioSVC implements IrisService {
}
try {
dir = zipFiles.length == 1 && zipFiles[0].isDirectory() ? zipFiles[0] : null;
dir = zipFiles.length > 1 ? work : zipFiles[0].isDirectory() ? zipFiles[0] : null;
} catch (NullPointerException e) {
Iris.reportError(e);
sender.sendMessage("Error when finding home directory. Are there any non-text characters in the file name?");

View File

@@ -152,7 +152,6 @@ public class IrisCreator {
J.a(() ->
{
int req = 441;
Supplier<Integer> g = () -> {
if (finalAccess1 == null || finalAccess1.getEngine() == null) {
return 0;
@@ -160,6 +159,9 @@ public class IrisCreator {
return finalAccess1.getEngine().getGenerated();
};
if(!benchmark) {
if (finalAccess1 == null) return;
int req = finalAccess1.getSpawnChunks().join();
while (g.get() < req) {
double v = (double) g.get() / (double) req;
if (sender.isPlayer()) {

View File

@@ -124,7 +124,6 @@ public class IrisComplex implements DataProvider {
ProceduralStream.of((x, z) -> focusRegion,
Interpolated.of(a -> 0D, a -> focusRegion))
: regionStyleStream
.zoom(engine.getDimension().getRegionZoom())
.selectRarity(data.getRegionLoader().loadAll(engine.getDimension().getRegions()))
.cache2D("regionStream", engine, cacheSize).waste("Region Stream");
regionIDStream = regionIdentityStream.convertCached((i) -> new UUID(Double.doubleToLongBits(i),

View File

@@ -45,9 +45,11 @@ public class IrisSeaFloorDecorator extends IrisEngineDecorator {
}
if (height >= 0 || height < getEngine().getHeight()) {
if (null != decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData())) {
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()));
height++;
data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData()));
if (height == getDimension().getFluidHeight() - 1) {
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()));
height++;
data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData()));
}
} else {
data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()));
}

View File

@@ -63,6 +63,7 @@ import java.io.IOException;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@@ -84,6 +85,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
private final AtomicBoolean setup;
private final boolean studio;
private final AtomicInteger a = new AtomicInteger(0);
private final CompletableFuture<Integer> spawnChunks = new CompletableFuture<>();
private final boolean smartVanillaHeight;
private Engine engine;
private Looper hotloader;
@@ -148,6 +150,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
} else {
INMS.get().inject(event.getWorld().getSeed(), engine, event.getWorld());
Iris.info("Injected Iris Biome Source into " + event.getWorld().getName());
spawnChunks.complete(INMS.get().getSpawnChunkCount(event.getWorld()));
initialized = true;
}
}

View File

@@ -25,6 +25,7 @@ import com.volmit.iris.engine.framework.Hotloadable;
import com.volmit.iris.util.data.DataProvider;
import org.bukkit.World;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
public interface PlatformChunkGenerator extends Hotloadable, DataProvider {
@@ -46,4 +47,6 @@ public interface PlatformChunkGenerator extends Hotloadable, DataProvider {
boolean isStudio();
void touch(World world);
CompletableFuture<Integer> getSpawnChunks();
}

View File

@@ -10,6 +10,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicInteger;
@@ -576,4 +577,12 @@ public class NMSBinding implements INMSBinding {
public DataVersion getDataVersion() {
return DataVersion.V1205;
}
@Override
public int getSpawnChunkCount(World world) {
var radius = Optional.ofNullable(world.getGameRuleValue(GameRule.SPAWN_CHUNK_RADIUS))
.orElseGet(() -> world.getGameRuleDefault(GameRule.SPAWN_CHUNK_RADIUS));
if (radius == null) throw new IllegalStateException("GameRule.SPAWN_CHUNK_RADIUS is null!");
return (int) Math.pow(2 * radius + 1, 2);
}
}

View File

@@ -10,6 +10,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.Vector;
import java.util.concurrent.atomic.AtomicInteger;
@@ -581,4 +582,12 @@ public class NMSBinding implements INMSBinding {
public DataVersion getDataVersion() {
return DataVersion.V1205;
}
@Override
public int getSpawnChunkCount(World world) {
var radius = Optional.ofNullable(world.getGameRuleValue(GameRule.SPAWN_CHUNK_RADIUS))
.orElseGet(() -> world.getGameRuleDefault(GameRule.SPAWN_CHUNK_RADIUS));
if (radius == null) throw new IllegalStateException("GameRule.SPAWN_CHUNK_RADIUS is null!");
return (int) Math.pow(2 * radius + 1, 2);
}
}