Skip to content

Commit

Permalink
Add Ring of Protection to chest loot
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Sep 27, 2024
1 parent c731947 commit 82ab558
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/mod/icarus/crimsonrevelations/init/CRLootTables.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.world.storage.loot.LootEntry;
import net.minecraft.world.storage.loot.LootEntryItem;
import net.minecraft.world.storage.loot.LootPool;
import net.minecraft.world.storage.loot.LootTableList;
import net.minecraft.world.storage.loot.RandomValueRange;
import net.minecraft.world.storage.loot.conditions.KilledByPlayer;
import net.minecraft.world.storage.loot.conditions.LootCondition;
Expand Down Expand Up @@ -45,5 +46,16 @@ public static void onLootTableLoad(LootTableLoadEvent event) {
new LootCondition[0], "crimsonrevelations:crimson_plate"));
}
}

if (event.getName().equals(LootTableList.CHESTS_DESERT_PYRAMID) || event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)) {
LootPool main = event.getTable().getPool("main");
main.addEntry(new LootEntryItem(CRItems.protectionRing, 5, 0, new LootFunction[0], new LootCondition[0], "loottable:protection_ring"));
}

if (event.getName().equals(LootTableList.CHESTS_JUNGLE_TEMPLE) || event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CROSSING) ||
event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR)) {
LootPool main = event.getTable().getPool("main");
main.addEntry(new LootEntryItem(CRItems.protectionRing, 3, 0, new LootFunction[0], new LootCondition[0], "loottable:protection_ring"));
}
}
}

0 comments on commit 82ab558

Please sign in to comment.