Interface IMutationCondition


public interface IMutationCondition
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    A localized description of the mutation condition.
    float
    modifyChance(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, IMutation<?> mutation, IGenome firstGenome, IGenome secondGenome, IClimateProvider climate, float currentChance)
    Used to modify the chance of a mutation based on certain conditions being met.
  • Method Details

    • modifyChance

      float modifyChance(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, IMutation<?> mutation, IGenome firstGenome, IGenome secondGenome, IClimateProvider climate, float currentChance)
      Used to modify the chance of a mutation based on certain conditions being met. Most conditions will either return the current chance or 0.0f if the condition is not met.
      Parameters:
      level - The world.
      pos - The position where this mutation is taking place.
      mutation - The mutation.
      firstGenome - The genome of one parent in the mutation. Order of genomes does not necessarily match mutation.
      secondGenome - The genome of the other parent in the mutation. Order of genomes does not necessarily match mutation.
      climate - The climate in which this mutation is taking place.
      currentChance - The current chance. Starts out as the base chance of the mutation, but may be modified by other IMutationCondition.
      Returns:
      The new mutation chance. Usually currentChance if the condition is met, 0.0f if it is not.
    • getDescription

      net.minecraft.network.chat.Component getDescription()
      A localized description of the mutation condition. (i.e. "A temperature of HOT is required.")