mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 14:21:33 +00:00
+2
-2
@@ -24,10 +24,10 @@ plugins {
|
|||||||
id "de.undercouch.download" version "5.0.1"
|
id "de.undercouch.download" version "5.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
version '2.2.14-1.19.2' // Needs to be version specific
|
version '2.2.15-1.19.2' // Needs to be version specific
|
||||||
def nmsVersion = "1.19.2"
|
def nmsVersion = "1.19.2"
|
||||||
def apiVersion = '1.19'
|
def apiVersion = '1.19'
|
||||||
def spigotJarVersion = '1.19.1-R0.1-SNAPSHOT'
|
def spigotJarVersion = '1.19.2-R0.1-SNAPSHOT'
|
||||||
def name = getRootProject().getName() // Defined in settings.gradle
|
def name = getRootProject().getName() // Defined in settings.gradle
|
||||||
def main = 'com.volmit.iris.Iris'
|
def main = 'com.volmit.iris.Iris'
|
||||||
|
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
});
|
});
|
||||||
|
|
||||||
KList<ItemStack> d = new KList<>();
|
KList<ItemStack> d = new KList<>();
|
||||||
IrisBiome b = getEngine().getBiome(e.getBlock().getLocation());
|
IrisBiome b = getEngine().getBiome(e.getBlock().getLocation().clone().subtract(0, getEngine().getWorld().minHeight(), 0));
|
||||||
List<IrisBlockDrops> dropProviders = filterDrops(b.getBlockDrops(), e, getData());
|
List<IrisBlockDrops> dropProviders = filterDrops(b.getBlockDrops(), e, getData());
|
||||||
|
|
||||||
if(dropProviders.stream().noneMatch(IrisBlockDrops::isSkipParents)) {
|
if(dropProviders.stream().noneMatch(IrisBlockDrops::isSkipParents)) {
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import com.volmit.iris.core.gui.components.RenderType;
|
|||||||
import com.volmit.iris.core.gui.components.Renderer;
|
import com.volmit.iris.core.gui.components.Renderer;
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.core.loader.IrisRegistrant;
|
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||||
import com.volmit.iris.core.nms.INMS;
|
|
||||||
import com.volmit.iris.engine.IrisComplex;
|
import com.volmit.iris.engine.IrisComplex;
|
||||||
import com.volmit.iris.engine.data.cache.Cache;
|
import com.volmit.iris.engine.data.cache.Cache;
|
||||||
import com.volmit.iris.engine.data.chunk.TerrainChunk;
|
import com.volmit.iris.engine.data.chunk.TerrainChunk;
|
||||||
@@ -422,21 +421,27 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
|||||||
default KList<IrisLootTable> getLootTables(RNG rng, Block b) {
|
default KList<IrisLootTable> getLootTables(RNG rng, Block b) {
|
||||||
int rx = b.getX();
|
int rx = b.getX();
|
||||||
int rz = b.getZ();
|
int rz = b.getZ();
|
||||||
|
int ry = b.getY() - getWorld().minHeight();
|
||||||
double he = getComplex().getHeightStream().get(rx, rz);
|
double he = getComplex().getHeightStream().get(rx, rz);
|
||||||
PlacedObject po = getObjectPlacement(rx, b.getY(), rz);
|
KList<IrisLootTable> tables = new KList<>();
|
||||||
if(po != null && po.getPlacement() != null) {
|
|
||||||
|
|
||||||
|
PlacedObject po = getObjectPlacement(rx, ry, rz);
|
||||||
|
if(po != null && po.getPlacement() != null) {
|
||||||
if(B.isStorageChest(b.getBlockData())) {
|
if(B.isStorageChest(b.getBlockData())) {
|
||||||
IrisLootTable table = po.getPlacement().getTable(b.getBlockData(), getData());
|
IrisLootTable table = po.getPlacement().getTable(b.getBlockData(), getData());
|
||||||
if(table != null) {
|
if(table != null) {
|
||||||
return new KList<>(table);
|
tables.add(table);
|
||||||
|
if(po.getPlacement().isOverrideGlobalLoot()) {
|
||||||
|
return new KList<>(table);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IrisRegion region = getComplex().getRegionStream().get(rx, rz);
|
IrisRegion region = getComplex().getRegionStream().get(rx, rz);
|
||||||
IrisBiome biomeSurface = getComplex().getTrueBiomeStream().get(rx, rz);
|
IrisBiome biomeSurface = getComplex().getTrueBiomeStream().get(rx, rz);
|
||||||
IrisBiome biomeUnder = b.getY() < he ? getComplex().getCaveBiomeStream().get(rx, rz) : biomeSurface;
|
IrisBiome biomeUnder = ry < he ? getComplex().getCaveBiomeStream().get(rx, rz) : biomeSurface;
|
||||||
KList<IrisLootTable> tables = new KList<>();
|
|
||||||
double multiplier = 1D * getDimension().getLoot().getMultiplier() * region.getLoot().getMultiplier() * biomeSurface.getLoot().getMultiplier() * biomeUnder.getLoot().getMultiplier();
|
double multiplier = 1D * getDimension().getLoot().getMultiplier() * region.getLoot().getMultiplier() * biomeSurface.getLoot().getMultiplier() * biomeUnder.getLoot().getMultiplier();
|
||||||
injectTables(tables, getDimension().getLoot());
|
injectTables(tables, getDimension().getLoot());
|
||||||
injectTables(tables, region.getLoot());
|
injectTables(tables, region.getLoot());
|
||||||
|
|||||||
@@ -122,6 +122,8 @@ public class IrisObjectPlacement {
|
|||||||
@ArrayType(min = 1, type = IrisObjectLoot.class)
|
@ArrayType(min = 1, type = IrisObjectLoot.class)
|
||||||
@Desc("The loot tables to apply to these objects")
|
@Desc("The loot tables to apply to these objects")
|
||||||
private KList<IrisObjectLoot> loot = new KList<>();
|
private KList<IrisObjectLoot> loot = new KList<>();
|
||||||
|
@Desc("Whether the given loot tables override any and all other loot tables available in the dimension, region or biome.")
|
||||||
|
private boolean overrideGlobalLoot = false;
|
||||||
@Desc("This object / these objects override the following trees when they grow...")
|
@Desc("This object / these objects override the following trees when they grow...")
|
||||||
@ArrayType(min = 1, type = IrisTree.class)
|
@ArrayType(min = 1, type = IrisTree.class)
|
||||||
private KList<IrisTree> trees = new KList<>();
|
private KList<IrisTree> trees = new KList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user