9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-29 12:09:07 +00:00

Compare commits

..

22 Commits

Author SHA1 Message Date
Brian Fopiano
99d3dba440 Merge pull request #1026 from CocoTheOwner/jigsawRotationFix
Disable initial rotation if set to true
2023-09-17 13:47:51 -04:00
Brian Fopiano
5a44e79ad1 Merge pull request #1022 from CrazyDev05/jigsaw_loot_fix
Jigsaw loot fix
2023-09-17 13:47:26 -04:00
CocoTheOwner
86808017db Disable initial rotation if set to true 2023-09-06 18:24:15 +02:00
CrazyDev22
f735db9843 Fix not finding IrisObjectPlacement for jigsaw structures 2023-09-02 10:31:34 +02:00
CrazyDev22
5a333c23ac Fix Exact BlockData Filter 2023-09-02 10:30:44 +02:00
Brian Neumann-Fopiano
4d2d51edfa v+ 2023-08-31 14:50:49 -04:00
Brian Fopiano
dcfd5a0cd8 Merge pull request #1010 from theDAVID543/master
fix bug
2023-08-31 14:41:28 -04:00
theDAVID543
a821c0da50 fix bug 2023-08-18 11:53:06 +08:00
Brian Neumann-Fopiano
804147e2c4 overworld bump 2023-08-12 11:47:42 -04:00
Brian Neumann-Fopiano
ed346291f9 oops v+ 2023-07-29 06:13:42 -04:00
Brian Fopiano
2190f6eff8 Merge pull request #1003 from CocoTheOwner/better-pregen-pred
Predict the ETA for pregeneration more rapidly
2023-07-29 03:04:07 -07:00
Brian Fopiano
ce30e24e42 Merge pull request #1002 from CocoTheOwner/pregen-center-rescale
Fixes a scaling issue with pregen center
2023-07-29 03:03:27 -07:00
Brian Fopiano
d5e13541c8 Merge pull request #1000 from christolis/fix-macos-build-error
Fix unresolved dependency error
2023-07-29 03:03:11 -07:00
Brian Fopiano
2e707adaa0 Merge branch 'master' into fix-macos-build-error 2023-07-29 03:03:00 -07:00
Brian Fopiano
4d8e36cb05 Update bug.yml 2023-07-24 04:34:17 -04:00
Brian Neumann-Fopiano
73b710cdde oraxen update 2023-07-16 18:46:31 -04:00
Brian Neumann-Fopiano
09182bf3f3 V+ for iris overworld tweaks 2023-07-13 07:09:09 -04:00
CocoTheOwner
9a945837cd Actually just after 1 region is generated switch 2023-07-10 23:09:02 +02:00
CocoTheOwner
b64c821ef4 smooth into the warm-up generator 2023-07-10 23:00:28 +02:00
CocoTheOwner
a9ab3bc519 Predict pregen better 2023-07-10 22:49:50 +02:00
CocoTheOwner
94292cea6e shift pregen center to blocks instead of regions 2023-07-10 18:43:49 +02:00
Christolis
b5fdeb2a02 build: add extra dependency 2023-07-08 00:26:43 +03:00
9 changed files with 72 additions and 12 deletions

View File

@@ -40,6 +40,9 @@ body:
- 1.17.1
- 1.18
- 1.19
- 1.20
- 1.21
- 1.22
validations:
required: true
- type: input

View File

@@ -24,7 +24,7 @@ plugins {
id "de.undercouch.download" version "5.0.1"
}
version '2.7.2-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')

View File

@@ -91,7 +91,7 @@ import java.util.Map;
@SuppressWarnings("CanBeFinal")
public class Iris extends VolmitPlugin implements Listener {
public static final String OVERWORLD_TAG = "3004";
public static final String OVERWORLD_TAG = "3620";
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();

View File

@@ -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);

View File

@@ -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() {

View File

@@ -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();

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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();