Class ContaminateGlobalLootModifier

java.lang.Object
net.neoforged.neoforge.common.loot.LootModifier
com.petrolpark.core.contamination.ContaminateGlobalLootModifier
All Implemented Interfaces:
net.neoforged.neoforge.common.loot.IGlobalLootModifier

public class ContaminateGlobalLootModifier extends net.neoforged.neoforge.common.loot.LootModifier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.world.level.storage.loot.providers.number.NumberProvider
     
    static final com.mojang.serialization.MapCodec<ContaminateGlobalLootModifier>
     
    protected final net.minecraft.core.Holder<Contaminant>
     

    Fields inherited from class net.neoforged.neoforge.common.loot.LootModifier

    conditions

    Fields inherited from interface net.neoforged.neoforge.common.loot.IGlobalLootModifier

    CONDITIONAL_CODEC, DIRECT_CODEC, LOOT_CONDITIONS_CODEC
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ContaminateGlobalLootModifier(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditionsIn, net.minecraft.core.Holder<Contaminant> contaminant, net.minecraft.world.level.storage.loot.providers.number.NumberProvider chanceProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.loot.IGlobalLootModifier>
     
    protected @NotNull it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack>
    doApply(it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack> generatedLoot, net.minecraft.world.level.storage.loot.LootContext context)
     
    net.minecraft.world.level.storage.loot.providers.number.NumberProvider
     
    net.minecraft.core.Holder<Contaminant>
     

    Methods inherited from class net.neoforged.neoforge.common.loot.LootModifier

    apply, codecStart

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<ContaminateGlobalLootModifier> CODEC
    • contaminant

      protected final net.minecraft.core.Holder<Contaminant> contaminant
    • chanceProvider

      protected final net.minecraft.world.level.storage.loot.providers.number.NumberProvider chanceProvider
  • Constructor Details

    • ContaminateGlobalLootModifier

      protected ContaminateGlobalLootModifier(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditionsIn, net.minecraft.core.Holder<Contaminant> contaminant, net.minecraft.world.level.storage.loot.providers.number.NumberProvider chanceProvider)
  • Method Details

    • getChanceProvider

      public net.minecraft.world.level.storage.loot.providers.number.NumberProvider getChanceProvider()
    • getContaminant

      public net.minecraft.core.Holder<Contaminant> getContaminant()
    • codec

      public com.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.loot.IGlobalLootModifier> codec()
    • doApply

      @NotNull protected @NotNull it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack> doApply(@Nonnull it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack> generatedLoot, @Nonnull net.minecraft.world.level.storage.loot.LootContext context)
      Specified by:
      doApply in class net.neoforged.neoforge.common.loot.LootModifier