mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 12:09:07 +00:00
Compare commits
24 Commits
2.7.1-1.20
...
2.7.7-1.20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99d3dba440 | ||
|
|
5a44e79ad1 | ||
|
|
86808017db | ||
|
|
f735db9843 | ||
|
|
5a333c23ac | ||
|
|
4d2d51edfa | ||
|
|
dcfd5a0cd8 | ||
|
|
a821c0da50 | ||
|
|
804147e2c4 | ||
|
|
ed346291f9 | ||
|
|
2190f6eff8 | ||
|
|
ce30e24e42 | ||
|
|
d5e13541c8 | ||
|
|
2e707adaa0 | ||
|
|
4d8e36cb05 | ||
|
|
73b710cdde | ||
|
|
09182bf3f3 | ||
|
|
9a945837cd | ||
|
|
b64c821ef4 | ||
|
|
a9ab3bc519 | ||
|
|
94292cea6e | ||
|
|
b5fdeb2a02 | ||
|
|
fa3ac36e8c | ||
|
|
6632d1b65f |
3
.github/ISSUE_TEMPLATE/bug.yml
vendored
3
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -40,6 +40,9 @@ body:
|
||||
- 1.17.1
|
||||
- 1.18
|
||||
- 1.19
|
||||
- 1.20
|
||||
- 1.21
|
||||
- 1.22
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
|
||||
@@ -24,7 +24,7 @@ plugins {
|
||||
id "de.undercouch.download" version "5.0.1"
|
||||
}
|
||||
|
||||
version '2.7.1-1.20.1'
|
||||
version '2.7.6-1.20.1'
|
||||
def nmsVersion = '1.20.1' //[NMS]
|
||||
def apiVersion = '1.20'
|
||||
def specialSourceVersion = '1.11.0' //[NMS]
|
||||
@@ -83,6 +83,7 @@ repositories {
|
||||
maven { url "https://mvn.lumine.io/repository/maven/" }
|
||||
maven { url "https://repo.triumphteam.dev/snapshots" }
|
||||
maven { url "https://repo.mineinabyss.com/releases" }
|
||||
maven { url = 'https://hub.jeff-media.com/nexus/repository/jeff-media-public/' }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +134,8 @@ dependencies {
|
||||
implementation 'org.bukkit:craftbukkit:1.20.1-R0.1-SNAPSHOT:remapped-mojang' //[NMS]
|
||||
|
||||
// Third Party Integrations
|
||||
implementation 'com.github.oraxen:oraxen:1.152.5'
|
||||
implementation 'com.ticxo.playeranimator:PlayerAnimator:R1.2.7'
|
||||
implementation 'com.github.oraxen:oraxen:1.158.0'
|
||||
implementation 'com.github.LoneDev6:api-itemsadder:3.4.1-r4'
|
||||
implementation 'me.clip:placeholderapi:2.11.3'
|
||||
//implementation files('libs/CustomItems.jar')
|
||||
|
||||
@@ -91,7 +91,7 @@ import java.util.Map;
|
||||
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
public class Iris extends VolmitPlugin implements Listener {
|
||||
public static final String OVERWORLD_TAG = "3003";
|
||||
public static final String OVERWORLD_TAG = "3620";
|
||||
|
||||
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CommandPregen implements DecreeExecutor {
|
||||
int w = (radius >> 9 + 1) * 2;
|
||||
IrisToolbelt.pregenerate(PregenTask
|
||||
.builder()
|
||||
.center(new Position2(center))
|
||||
.center(new Position2(center.getBlockX() >> 9, center.getBlockZ() >> 9))
|
||||
.width(w)
|
||||
.height(w)
|
||||
.build(), world);
|
||||
|
||||
@@ -111,8 +111,12 @@ public class IrisPregenerator {
|
||||
}
|
||||
|
||||
private long computeETA() {
|
||||
return (long) ((totalChunks.get() - generated.get()) *
|
||||
((double) (M.ms() - startTime.get()) / (double) generated.get()));
|
||||
return (long) (totalChunks.get() > 1024 ? // Generated chunks exceed 1/8th of total?
|
||||
// If yes, use smooth function (which gets more accurate over time since its less sensitive to outliers)
|
||||
((totalChunks.get() - generated.get()) * ((double) (M.ms() - startTime.get()) / (double) generated.get())) :
|
||||
// If no, use quick function (which is less accurate over time but responds better to the initial delay)
|
||||
((totalChunks.get() - generated.get()) / chunksPerSecond.getAverage()) * 1000 //
|
||||
);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
|
||||
@@ -36,6 +36,9 @@ import com.volmit.iris.util.context.ChunkContext;
|
||||
import com.volmit.iris.util.context.IrisContext;
|
||||
import com.volmit.iris.util.data.B;
|
||||
import com.volmit.iris.util.data.DataProvider;
|
||||
import com.volmit.iris.util.decree.handlers.JigsawPieceHandler;
|
||||
import com.volmit.iris.util.decree.handlers.JigsawPoolHandler;
|
||||
import com.volmit.iris.util.decree.handlers.JigsawStructureHandler;
|
||||
import com.volmit.iris.util.documentation.BlockCoordinates;
|
||||
import com.volmit.iris.util.documentation.ChunkCoordinates;
|
||||
import com.volmit.iris.util.format.C;
|
||||
@@ -54,6 +57,7 @@ import com.volmit.iris.util.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.scheduling.ChronoLatch;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.scheduling.S;
|
||||
import com.volmit.iris.util.stream.ProceduralStream;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -73,9 +77,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
import oshi.util.tuples.Pair;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
@@ -651,7 +654,7 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
||||
}
|
||||
|
||||
default IrisPosition lookForRegion(IrisRegion reg, long timeout, Consumer<Integer> triesc) {
|
||||
if (getWorld().hasRealWorld()) {
|
||||
if (!getWorld().hasRealWorld()) {
|
||||
Iris.error("Cannot GOTO without a bound world (headless mode)");
|
||||
return null;
|
||||
}
|
||||
@@ -774,9 +777,54 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
||||
}
|
||||
}
|
||||
|
||||
KList<String> pieces = new KList<>();
|
||||
KList<String> pools = new KList<>();
|
||||
int r = 2;
|
||||
for (int xX = -r; xX <= r; xX++) {
|
||||
for (int zZ = -r; zZ <= r; zZ++) {
|
||||
IrisJigsawStructure structure = getStructureAt((x >> 4) + xX, (z >> 4) + zZ);
|
||||
if (structure != null) {
|
||||
for (String pieceID : structure.getPieces()) {
|
||||
IrisJigsawPiece result = searchAllPieces(pieceID, object, pieces, pools);
|
||||
if (result != null) {
|
||||
pieces.clear();
|
||||
pools.clear();
|
||||
return new PlacedObject(result.getPlacementOptions(), getData().getObjectLoader().load(object), id, x, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pieces.clear();
|
||||
pools.clear();
|
||||
|
||||
return new PlacedObject(null, getData().getObjectLoader().load(object), id, x, z);
|
||||
}
|
||||
|
||||
private IrisJigsawPiece searchAllPieces(String pieceID, String target, KList<String> pieces, KList<String> pools) {
|
||||
IrisJigsawPiece piece = getData().getJigsawPieceLoader().load(pieceID);
|
||||
if (piece.getObject().equals(target))
|
||||
return piece;
|
||||
|
||||
pieces.add(pieceID);
|
||||
for (IrisJigsawPieceConnector connector : piece.getConnectors()) {
|
||||
for (String poolID : connector.getPools()) {
|
||||
if (pools.contains(poolID))
|
||||
continue;
|
||||
pools.add(poolID);
|
||||
|
||||
for (String pieceId : getData().getJigsawPoolLoader().load(poolID).getPieces()) {
|
||||
if (pieces.contains(pieceId))
|
||||
continue;
|
||||
|
||||
IrisJigsawPiece piece1 = searchAllPieces(pieceId, target, pieces, pools);
|
||||
if (piece1 != null)
|
||||
return piece1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
int getCacheID();
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ public class PlannedStructure {
|
||||
}
|
||||
|
||||
private void generateStartPiece() {
|
||||
pieces.add(new PlannedPiece(this, position, getData().getJigsawPieceLoader().load(rng.pick(getStructure().getPieces())), 0, rng.nextInt(4), 0));
|
||||
pieces.add(new PlannedPiece(this, position, getData().getJigsawPieceLoader().load(rng.pick(getStructure().getPieces())), 0, getStructure().isDisableInitialRotation() ? 0 : rng.nextInt(4), 0));
|
||||
}
|
||||
|
||||
private void generateTerminators() {
|
||||
|
||||
@@ -62,6 +62,9 @@ public class IrisJigsawStructure extends IrisRegistrant {
|
||||
@Desc("Force Y to a specific value")
|
||||
private int lockY = -1;
|
||||
|
||||
@Desc("Set to true to prevent rotating the initial structure piece")
|
||||
private boolean disableInitialRotation = false;
|
||||
|
||||
private transient AtomicCache<Integer> maxDimension = new AtomicCache<>();
|
||||
|
||||
private void loadPool(String p, KList<String> pools, KList<String> pieces) {
|
||||
|
||||
@@ -255,7 +255,7 @@ public class IrisObjectPlacement {
|
||||
|
||||
if (B.isStorageChest(data)) {
|
||||
IrisLootTable picked = null;
|
||||
if (cache.exact.containsKey(data.getMaterial()) && cache.exact.containsKey(data)) {
|
||||
if (cache.exact.containsKey(data.getMaterial()) && cache.exact.get(data.getMaterial()).containsKey(data)) {
|
||||
picked = cache.exact.get(data.getMaterial()).get(data).pullRandom();
|
||||
} else if (cache.basic.containsKey(data.getMaterial())) {
|
||||
picked = cache.basic.get(data.getMaterial()).pullRandom();
|
||||
|
||||
Reference in New Issue
Block a user