Search in sources :

Example 1 with BonusNuggetModifier

use of com.verdantartifice.primalmagick.common.loot.modifiers.BonusNuggetModifier in project PrimalMagick by daedalus4096.

the class LootModifierProvider method start.

@Override
protected void start() {
    this.add("bloody_flesh", LootModifierSerializersPM.BLOODY_FLESH.get(), new BloodyFleshModifier(new LootItemCondition[] { LootItemEntityPropertyCondition.hasProperties(EntityTarget.THIS, EntityPredicate.Builder.entity().of(EntityTypeTagsPM.DROPS_BLOODY_FLESH)).build(), LootItemKilledByPlayerCondition.killedByPlayer().build(), LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.5F, 0.1F).build() }));
    this.add("bounty_farming", LootModifierSerializersPM.BOUNTY_FARMING.get(), new BountyFarmingModifier(new LootItemCondition[] { MatchBlockTag.builder(BlockTagsPM.BOUNTY_CROPS).build(), MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(EnchantmentsPM.BOUNTY.get(), MinMaxBounds.Ints.atLeast(1)))).build() }, 0.25F));
    this.add("bounty_fishing", LootModifierSerializersPM.BOUNTY_FISHING.get(), new BountyFishingModifier(new LootItemCondition[] { LootItemEntityPropertyCondition.hasProperties(EntityTarget.THIS, EntityPredicate.Builder.entity().fishingHook(FishingHookPredicate.inOpenWater(false))).build(), MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(EnchantmentsPM.BOUNTY.get(), MinMaxBounds.Ints.atLeast(1)))).build() }, 0.25F));
    this.add("bonus_nugget_iron", LootModifierSerializersPM.BONUS_NUGGET.get(), new BonusNuggetModifier(new LootItemCondition[] { MatchBlockTag.builder(Tags.Blocks.ORES_IRON).build(), MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(EnchantmentsPM.LUCKY_STRIKE.get(), MinMaxBounds.Ints.atLeast(1)))).build() }, 0.5F, Items.IRON_NUGGET));
    this.add("bonus_nugget_gold", LootModifierSerializersPM.BONUS_NUGGET.get(), new BonusNuggetModifier(new LootItemCondition[] { MatchBlockTag.builder(Tags.Blocks.ORES_GOLD).build(), MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(EnchantmentsPM.LUCKY_STRIKE.get(), MinMaxBounds.Ints.atLeast(1)))).build() }, 0.5F, Items.GOLD_NUGGET));
    this.add("bonus_nugget_quartz", LootModifierSerializersPM.BONUS_NUGGET.get(), new BonusNuggetModifier(new LootItemCondition[] { MatchBlockTag.builder(Tags.Blocks.ORES_QUARTZ).build(), MatchTool.toolMatches(ItemPredicate.Builder.item().hasEnchantment(new EnchantmentPredicate(EnchantmentsPM.LUCKY_STRIKE.get(), MinMaxBounds.Ints.atLeast(1)))).build() }, 0.5F, ItemsPM.QUARTZ_NUGGET.get()));
    this.add("blood_notes_high", LootModifierSerializersPM.BLOOD_NOTES.get(), new BloodNotesModifier(new LootItemCondition[] { LootItemEntityPropertyCondition.hasProperties(EntityTarget.THIS, EntityPredicate.Builder.entity().of(EntityTypeTagsPM.DROPS_BLOOD_NOTES_HIGH)).build(), LootItemKilledByPlayerCondition.killedByPlayer().build() }));
    this.add("blood_notes_low", LootModifierSerializersPM.BLOOD_NOTES.get(), new BloodNotesModifier(new LootItemCondition[] { LootItemEntityPropertyCondition.hasProperties(EntityTarget.THIS, EntityPredicate.Builder.entity().of(EntityTypeTagsPM.DROPS_BLOOD_NOTES_LOW)).build(), LootItemKilledByPlayerCondition.killedByPlayer().build(), LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.25F, 0.25F).build() }));
    this.add("relic_fragments_high", LootModifierSerializersPM.RELIC_FRAGMENTS.get(), new RelicFragmentsModifier(new LootItemCondition[] { LootItemEntityPropertyCondition.hasProperties(EntityTarget.THIS, EntityPredicate.Builder.entity().of(EntityTypeTagsPM.DROPS_RELIC_FRAGMENTS_HIGH)).build(), LootItemKilledByPlayerCondition.killedByPlayer().build() }, 3, 5, 1));
    this.add("relic_fragments_low", LootModifierSerializersPM.RELIC_FRAGMENTS.get(), new RelicFragmentsModifier(new LootItemCondition[] { LootItemEntityPropertyCondition.hasProperties(EntityTarget.THIS, EntityPredicate.Builder.entity().of(EntityTypeTagsPM.DROPS_RELIC_FRAGMENTS_LOW)).build(), LootItemKilledByPlayerCondition.killedByPlayer().build(), LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.1F, 0.05F).build() }, 1, 1, 0));
    this.add("four_leaf_clover_short_grass", LootModifierSerializersPM.FOUR_LEAF_CLOVER.get(), new FourLeafCloverModifier(new LootItemCondition[] { LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.GRASS).build(), LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.002F, 0.002F).build() }));
    this.add("four_leaf_clover_tall_grass", LootModifierSerializersPM.FOUR_LEAF_CLOVER.get(), new FourLeafCloverModifier(new LootItemCondition[] { LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.TALL_GRASS).build(), LootItemRandomChanceWithLootingCondition.randomChanceAndLootingBoost(0.002F, 0.002F).build() }));
}
Also used : BloodyFleshModifier(com.verdantartifice.primalmagick.common.loot.modifiers.BloodyFleshModifier) EnchantmentPredicate(net.minecraft.advancements.critereon.EnchantmentPredicate) BonusNuggetModifier(com.verdantartifice.primalmagick.common.loot.modifiers.BonusNuggetModifier) LootItemCondition(net.minecraft.world.level.storage.loot.predicates.LootItemCondition) BountyFishingModifier(com.verdantartifice.primalmagick.common.loot.modifiers.BountyFishingModifier) FourLeafCloverModifier(com.verdantartifice.primalmagick.common.loot.modifiers.FourLeafCloverModifier) RelicFragmentsModifier(com.verdantartifice.primalmagick.common.loot.modifiers.RelicFragmentsModifier) BloodNotesModifier(com.verdantartifice.primalmagick.common.loot.modifiers.BloodNotesModifier) BountyFarmingModifier(com.verdantartifice.primalmagick.common.loot.modifiers.BountyFarmingModifier)

Aggregations

BloodNotesModifier (com.verdantartifice.primalmagick.common.loot.modifiers.BloodNotesModifier)1 BloodyFleshModifier (com.verdantartifice.primalmagick.common.loot.modifiers.BloodyFleshModifier)1 BonusNuggetModifier (com.verdantartifice.primalmagick.common.loot.modifiers.BonusNuggetModifier)1 BountyFarmingModifier (com.verdantartifice.primalmagick.common.loot.modifiers.BountyFarmingModifier)1 BountyFishingModifier (com.verdantartifice.primalmagick.common.loot.modifiers.BountyFishingModifier)1 FourLeafCloverModifier (com.verdantartifice.primalmagick.common.loot.modifiers.FourLeafCloverModifier)1 RelicFragmentsModifier (com.verdantartifice.primalmagick.common.loot.modifiers.RelicFragmentsModifier)1 EnchantmentPredicate (net.minecraft.advancements.critereon.EnchantmentPredicate)1 LootItemCondition (net.minecraft.world.level.storage.loot.predicates.LootItemCondition)1