9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-24 17:49:16 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Brian Fopiano
e6def804f8 Merge pull request #883 from VolmitSoftware/Development
Development
2022-09-02 17:48:22 -07:00
Vatuu
a5be48c07c V+ 2022-09-02 23:35:38 +02:00
Vatuu
fe3909f594 Fixed block drops not firing for biomes. 2022-09-02 23:32:51 +02:00
Vatuu
f37d91a530 Fixed loot table object override not working. 2022-09-02 23:26:47 +02:00
Vatuu
614ef78771 Fixed reliance on outdated spigot api version. 2022-09-02 20:32:17 +02:00
4 changed files with 16 additions and 9 deletions

View File

@@ -24,10 +24,10 @@ plugins {
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 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 main = 'com.volmit.iris.Iris'

View File

@@ -624,7 +624,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
});
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());
if(dropProviders.stream().noneMatch(IrisBlockDrops::isSkipParents)) {

View File

@@ -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.loader.IrisData;
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.data.cache.Cache;
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) {
int rx = b.getX();
int rz = b.getZ();
int ry = b.getY() - getWorld().minHeight();
double he = getComplex().getHeightStream().get(rx, rz);
PlacedObject po = getObjectPlacement(rx, b.getY(), rz);
if(po != null && po.getPlacement() != null) {
KList<IrisLootTable> tables = new KList<>();
PlacedObject po = getObjectPlacement(rx, ry, rz);
if(po != null && po.getPlacement() != null) {
if(B.isStorageChest(b.getBlockData())) {
IrisLootTable table = po.getPlacement().getTable(b.getBlockData(), getData());
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);
IrisBiome biomeSurface = getComplex().getTrueBiomeStream().get(rx, rz);
IrisBiome biomeUnder = b.getY() < he ? getComplex().getCaveBiomeStream().get(rx, rz) : biomeSurface;
KList<IrisLootTable> tables = new KList<>();
IrisBiome biomeUnder = ry < he ? getComplex().getCaveBiomeStream().get(rx, rz) : biomeSurface;
double multiplier = 1D * getDimension().getLoot().getMultiplier() * region.getLoot().getMultiplier() * biomeSurface.getLoot().getMultiplier() * biomeUnder.getLoot().getMultiplier();
injectTables(tables, getDimension().getLoot());
injectTables(tables, region.getLoot());

View File

@@ -122,6 +122,8 @@ public class IrisObjectPlacement {
@ArrayType(min = 1, type = IrisObjectLoot.class)
@Desc("The loot tables to apply to these objects")
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...")
@ArrayType(min = 1, type = IrisTree.class)
private KList<IrisTree> trees = new KList<>();