mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-24 17:49:16 +00:00
Compare commits
12 Commits
2.2.10-1.1
...
2.2.21-1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d3681beb4 | ||
|
|
0b403cf329 | ||
|
|
8ba75899e3 | ||
|
|
4d4ed72159 | ||
|
|
b72bf072b3 | ||
|
|
4edcb54b31 | ||
|
|
eae7fc0e53 | ||
|
|
fddacd4410 | ||
|
|
de6c4b9a30 | ||
|
|
6990e34138 | ||
|
|
d9883697ef | ||
|
|
05a26ff8b2 |
10
build.gradle
10
build.gradle
@@ -24,7 +24,7 @@ plugins {
|
||||
id "de.undercouch.download" version "5.0.1"
|
||||
}
|
||||
|
||||
version '2.2.10-1.19.2' // Needs to be version specific
|
||||
version '2.2.11-1.19.2' // Needs to be version specific
|
||||
def nmsVersion = "1.19.2"
|
||||
def apiVersion = '1.19'
|
||||
def spigotJarVersion = '1.19.1-R0.1-SNAPSHOT'
|
||||
@@ -77,7 +77,7 @@ repositories {
|
||||
maven { url "https://maven.enginehub.org/repo/" }
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://jitpack.io"}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ dependencies {
|
||||
implementation 'org.spigotmc:spigot-api:1.19.1-R0.1-SNAPSHOT'
|
||||
implementation 'me.clip:placeholderapi:2.11.1'
|
||||
implementation 'io.th0rgal:oraxen:1.94.0'
|
||||
implementation 'org.bukkit:craftbukkit:1.19.1-R0.1-SNAPSHOT:remapped-mojang'
|
||||
implementation 'org.bukkit:craftbukkit:1.19.2-R0.1-SNAPSHOT:remapped-mojang'
|
||||
implementation 'com.github.LoneDev6:api-itemsadder:3.1.0b'
|
||||
|
||||
// Shaded
|
||||
@@ -300,7 +300,7 @@ def registerCustomOutputTask(name, path) {
|
||||
from(new File(buildDir, "Iris-" + version + ".jar"))
|
||||
into(file(path))
|
||||
rename { String fileName ->
|
||||
fileName.replace("Iris-" + version + ".jar", "Iris-" + version + ".jar")
|
||||
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ def registerCustomOutputTaskUnix(name, path) {
|
||||
from(new File(buildDir, "Iris-" + version + ".jar"))
|
||||
into(file(path))
|
||||
rename { String fileName ->
|
||||
fileName.replace("Iris-" + version + ".jar", "Iris-" + version + ".jar")
|
||||
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,6 +387,8 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
}
|
||||
|
||||
private void enable() {
|
||||
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
||||
IrisToolbelt.retainMantleDataForSlice(BlockData.class.getCanonicalName());
|
||||
instance = this;
|
||||
services = new KMap<>();
|
||||
initialize("com.volmit.iris.core.service").forEach((i) -> services.put((Class<? extends IrisService>) i.getClass(), (IrisService) i));
|
||||
@@ -414,8 +416,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
splash();
|
||||
autoStartStudio();
|
||||
checkForBukkitWorlds();
|
||||
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
||||
IrisToolbelt.retainMantleDataForSlice(BlockData.class.getCanonicalName());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class CommandWhat implements DecreeExecutor {
|
||||
@Decree(description = "What biome am i in?", origin = DecreeOrigin.PLAYER)
|
||||
public void biome() {
|
||||
try {
|
||||
IrisBiome b = engine().getBiome(player().getLocation().getBlockX(), player().getLocation().getBlockY(), player().getLocation().getBlockZ());
|
||||
IrisBiome b = engine().getBiome(player().getLocation().getBlockX(), player().getLocation().getBlockY() - player().getWorld().getMinHeight(), player().getLocation().getBlockZ());
|
||||
sender().sendMessage("IBiome: " + b.getLoadKey() + " (" + b.getDerivative().name() + ")");
|
||||
|
||||
} catch(Throwable e) {
|
||||
|
||||
@@ -20,20 +20,10 @@ package com.volmit.iris.engine;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.engine.data.cache.Cache;
|
||||
import com.volmit.iris.core.loader.IrisData;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineAssignedWorldManager;
|
||||
import com.volmit.iris.engine.object.IRare;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisBlockDrops;
|
||||
import com.volmit.iris.engine.object.IrisEngineChunkData;
|
||||
import com.volmit.iris.engine.object.IrisEngineData;
|
||||
import com.volmit.iris.engine.object.IrisEngineSpawnerCooldown;
|
||||
import com.volmit.iris.engine.object.IrisEntitySpawn;
|
||||
import com.volmit.iris.engine.object.IrisMarker;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
import com.volmit.iris.engine.object.IrisSpawner;
|
||||
import com.volmit.iris.engine.object.*;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
@@ -55,6 +45,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -69,7 +60,6 @@ import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -617,7 +607,6 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
@Override
|
||||
public void onBlockBreak(BlockBreakEvent e) {
|
||||
if(e.getBlock().getWorld().equals(getTarget().getWorld().realWorld())) {
|
||||
|
||||
J.a(() -> {
|
||||
MatterMarker marker = getMantle().get(e.getBlock().getX(), e.getBlock().getY(), e.getBlock().getZ(), MatterMarker.class);
|
||||
|
||||
@@ -635,52 +624,30 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
});
|
||||
|
||||
KList<ItemStack> d = new KList<>();
|
||||
Runnable drop = () -> J.s(() -> d.forEach((i) -> e.getBlock().getWorld().dropItemNaturally(e.getBlock().getLocation().clone().add(0.5, 0.5, 0.5), i)));
|
||||
IrisBiome b = getEngine().getBiome(e.getBlock().getLocation());
|
||||
List<IrisBlockDrops> dropProviders = filterDrops(b.getBlockDrops(), e, getData());
|
||||
|
||||
if(dropItems(e, d, drop, b.getBlockDrops(), b)) {
|
||||
return;
|
||||
if(dropProviders.stream().noneMatch(IrisBlockDrops::isSkipParents)) {
|
||||
IrisRegion r = getEngine().getRegion(e.getBlock().getLocation());
|
||||
dropProviders.addAll(filterDrops(r.getBlockDrops(), e, getData()));
|
||||
dropProviders.addAll(filterDrops(getEngine().getDimension().getBlockDrops(), e, getData()));
|
||||
}
|
||||
|
||||
IrisRegion r = getEngine().getRegion(e.getBlock().getLocation());
|
||||
dropProviders.forEach(provider -> provider.fillDrops(false, d));
|
||||
|
||||
if(dropItems(e, d, drop, r.getBlockDrops(), b)) {
|
||||
return;
|
||||
if(dropProviders.stream().anyMatch(IrisBlockDrops::isReplaceVanillaDrops)) {
|
||||
e.setDropItems(false);
|
||||
}
|
||||
|
||||
for(IrisBlockDrops i : getEngine().getDimension().getBlockDrops()) {
|
||||
if(i.shouldDropFor(e.getBlock().getBlockData(), getData())) {
|
||||
if(i.isReplaceVanillaDrops()) {
|
||||
e.setDropItems(false);
|
||||
}
|
||||
|
||||
i.fillDrops(false, d);
|
||||
|
||||
if(i.isSkipParents()) {
|
||||
drop.run();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(d.isNotEmpty()) {
|
||||
World w = e.getBlock().getWorld();
|
||||
J.s(() -> d.forEach(item -> w.dropItemNaturally(e.getBlock().getLocation().clone().add(.5, .5, .5), item)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean dropItems(BlockBreakEvent e, KList<ItemStack> d, Runnable drop, KList<IrisBlockDrops> blockDrops, IrisBiome b) {
|
||||
for(IrisBlockDrops i : blockDrops) {
|
||||
if(i.shouldDropFor(e.getBlock().getBlockData(), getData())) {
|
||||
if(i.isReplaceVanillaDrops()) {
|
||||
e.setDropItems(false);
|
||||
}
|
||||
|
||||
i.fillDrops(false, d);
|
||||
|
||||
if(i.isSkipParents()) {
|
||||
drop.run();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
private List<IrisBlockDrops> filterDrops(KList<IrisBlockDrops> drops, BlockBreakEvent e, IrisData data) {
|
||||
return new KList<>(drops.stream().filter(d -> d.shouldDropFor(e.getBlock().getBlockData(), data)).toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,8 +56,7 @@ public class IrisBlockDrops {
|
||||
private boolean replaceVanillaDrops = false;
|
||||
|
||||
public boolean shouldDropFor(BlockData data, IrisData rdata) {
|
||||
KList<BlockData> list = this.data.aquire(() ->
|
||||
{
|
||||
KList<BlockData> list = this.data.aquire(() -> {
|
||||
KList<BlockData> b = new KList<>();
|
||||
|
||||
for(IrisBlockData i : getBlocks()) {
|
||||
|
||||
@@ -579,8 +579,7 @@ public class Mantle {
|
||||
}
|
||||
|
||||
public void deleteChunkSlice(int x, int z, Class<?> c) {
|
||||
if(!IrisToolbelt.toolbeltConfiguration.isEmpty() && IrisToolbelt.toolbeltConfiguration.getOrDefault("retain.mantle." + c.getCanonicalName(), false))
|
||||
{
|
||||
if(!IrisToolbelt.toolbeltConfiguration.isEmpty() && IrisToolbelt.toolbeltConfiguration.getOrDefault("retain.mantle." + c.getCanonicalName(), false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ name: ${name}
|
||||
version: ${version}
|
||||
main: ${main}
|
||||
load: STARTUP
|
||||
authors: [ cyberpwn, NextdoorPsycho. Vatuu ]
|
||||
authors: [ cyberpwn, NextdoorPsycho, Vatuu ]
|
||||
website: volmit.com
|
||||
description: More than a Dimension!
|
||||
libraries:
|
||||
@@ -21,5 +21,4 @@ commands:
|
||||
iris:
|
||||
aliases: [ ir, irs]
|
||||
api-version: ${apiversion}
|
||||
hotload-dependencies: false
|
||||
softdepend: [ "Oraxen", "ItemsAdder", "IrisFeller", "WorldEdit", "PlaceholderAPI"]
|
||||
hotload-dependencies: false
|
||||
Reference in New Issue
Block a user