use of net.minecraft.world.storage.loot.LootEntryTable in project Gaspunk by Ladysnake.
the class ModItems method onLootTableLoad.
@SubscribeEvent
public static void onLootTableLoad(LootTableLoadEvent event) {
if (event.getName().toString().equals("minecraft:chests/nether_bridge")) {
ResourceLocation loc = new ResourceLocation(GasPunk.MOD_ID, "inject/nether_bridge");
LootEntry entry = new LootEntryTable(loc, 1, 1, new LootCondition[0], "gaspunk_sulfur_entry");
LootPool pool = new LootPool(new LootEntry[] { entry }, new LootCondition[0], new RandomValueRange(1), new RandomValueRange(0, 1), "gaspunk_sulfur_pool");
event.getTable().addPool(pool);
}
}
use of net.minecraft.world.storage.loot.LootEntryTable in project pnc-repressurized by TeamPneumatic.
the class EventHandlerPneumaticCraft method onLootTableLoad.
@SubscribeEvent
public void onLootTableLoad(LootTableLoadEvent event) {
if (ConfigHandler.general.enableDungeonLoot) {
String prefix = "minecraft:chests/";
String name = event.getName().toString();
if (name.startsWith(prefix)) {
String file = name.substring(name.indexOf(prefix) + prefix.length());
switch(file) {
case "abandoned_mineshaft":
case "desert_pyramid":
case "jungle_temple":
case "simple_dungeon":
case "spawn_bonus_chest":
case "stronghold_corridor":
case "village_blacksmith":
LootEntry entry = new LootEntryTable(RL("inject/simple_dungeon_loot"), 1, 0, new LootCondition[0], "pneumaticcraft_inject_entry");
LootPool pool = new LootPool(new LootEntry[] { entry }, new LootCondition[0], new RandomValueRange(1), new RandomValueRange(0, 1), "pneumaticcraft_inject_pool");
event.getTable().addPool(pool);
break;
default:
break;
}
}
}
}
Aggregations