use of logictechcorp.libraryex.data.loottable.ModLootTableProvider in project NetherEx by LogicTechCorp.
the class DataGenerationHandler method gatherLootTables.
private static IDataProvider gatherLootTables(DataGenerator generator) {
ModLootTableProvider provider = new ModLootTableProvider(NetherEx.MOD_ID, generator);
// Block loot tables
for (Block block : ForgeRegistries.BLOCKS) {
if (block.getRegistryName().getNamespace().equals(NetherEx.MOD_ID)) {
if (block == NetherExBlocks.QUARTZ_ORE.get()) {
continue;
}
if (block.getLootTable() != LootTables.EMPTY) {
if (block instanceof SlabBlock) {
provider.addSlabBlockLootTable(block);
} else {
provider.addBasicBlockLootTable(block);
}
}
}
}
provider.addOreBlockLootTable(NetherExBlocks.RIME_ORE.get(), NetherExItems.RIME_CRYSTAL.get());
provider.addSilkBlockLootTable(NetherExBlocks.BROWN_ELDER_MUSHROOM_CAP.get());
provider.addSilkBlockLootTable(NetherExBlocks.RED_ELDER_MUSHROOM_CAP.get());
provider.addSilkBlockLootTable(NetherExBlocks.ELDER_MUSHROOM_STEM.get());
provider.addSilkBlockLootTable(NetherExBlocks.SOUL_GLASS.get());
provider.addSilkBlockLootTable(NetherExBlocks.SOUL_GLASS_PANE.get());
// Entity loot tables
provider.addEmptyEntityLootTable(NetherExEntityTypes.MOGUS.get());
provider.addBasicEntityLootTable(MogusEntity.Variant.BROWN.getLootTable(), NetherExBlocks.BROWN_ELDER_MUSHROOM.get());
provider.addBasicEntityLootTable(MogusEntity.Variant.RED.getLootTable(), NetherExBlocks.RED_ELDER_MUSHROOM.get());
provider.addBasicEntityLootTable(MogusEntity.Variant.WHITE.getLootTable(), NetherExItems.ENOKI_MUSHROOM.get());
provider.addEmptyEntityLootTable(NetherExEntityTypes.SALAMANDER.get());
provider.addBasicEntityLootTable(SalamanderEntity.Variant.ORANGE.getLootTable(), NetherExItems.ORANGE_SALAMANDER_HIDE.get());
provider.addBasicEntityLootTable(SalamanderEntity.Variant.BLACK.getLootTable(), NetherExItems.BLACK_SALAMANDER_HIDE.get());
provider.addBasicEntityLootTable(NetherExEntityTypes.SPINOUT.get(), Items.QUARTZ);
provider.addEmptyEntityLootTable(NetherExEntityTypes.SPORE.get());
provider.addBasicEntityLootTable(NetherExEntityTypes.SPORE_CREEPER.get(), NetherExItems.SPORE.get());
provider.addBasicEntityLootTable(NetherExEntityTypes.WIGHT.get(), NetherExItems.RIME_CRYSTAL.get());
provider.addBasicEntityLootTable(NetherExEntityTypes.COOLMAR_SPIDER.get(), NetherExItems.COOLMAR_SPIDER_FANG.get());
return provider;
}
Aggregations