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

Added Object & Jigsaw Loot Tables

- Added the ability for placed objects and jigsaws to have select loot tables
    - Includes the ability to filter loot tables based on block type/block state
    - Overrides loot tables from the biome/region, but if no loot tables are provided for an object, they will still be used
    - Uses weight based system for determining which table to pick (so it's guaranteed rather than by chance)
- Added WeightedRandom util class
- Fixed loot tables not being random based on the seed
- Fixed jigsaws breaking bedrock
- Fixed enchantments in loot tables not working for enchanted books
- Fixed mobs spawned in Jigsaws not being spawned in the center like they should be
This commit is contained in:
StrangeOne101
2021-06-29 00:24:36 +12:00
parent 4a11ed6dc4
commit 7d59edc8a5
11 changed files with 261 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ package com.volmit.iris.manager.command.studio;
import com.volmit.iris.Iris;
import com.volmit.iris.IrisSettings;
import com.volmit.iris.manager.IrisDataManager;
import com.volmit.iris.object.InventorySlotType;
import com.volmit.iris.object.IrisLootTable;
import com.volmit.iris.scaffold.IrisWorlds;
@@ -41,9 +42,9 @@ public class CommandIrisStudioLoot extends MortarCommand
Player p = sender.player();
IrisAccess prov = IrisWorlds.access(sender.player().getWorld());
if(prov == null)
if (!Iris.proj.isProjectOpen())
{
sender.sendMessage("You can only use /iris loot in a studio world of iris.");
sender.sendMessage("You can only use /iris studio loot in a studio world of iris.");
return true;
}