Class VillagerRebuildLevelAndXpFix

java.lang.Object
com.mojang.datafixers.DataFix
net.minecraft.util.datafix.fixes.VillagerRebuildLevelAndXpFix

public class VillagerRebuildLevelAndXpFix extends com.mojang.datafixers.DataFix
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int[]
     
    private static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    VillagerRebuildLevelAndXpFix(com.mojang.datafixers.schemas.Schema outputSchema, boolean changesType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static com.mojang.datafixers.Typed<?>
    addLevel(com.mojang.datafixers.Typed<?> typed, int level)
     
    private static com.mojang.datafixers.Typed<?>
    addXpFromLevel(com.mojang.datafixers.Typed<?> typed, int xp)
     
    static int
    getMinXpPerLevel(int level)
     
    com.mojang.datafixers.TypeRewriteRule
     

    Methods inherited from class com.mojang.datafixers.DataFix

    checked, convertUnchecked, fixTypeEverywhere, fixTypeEverywhere, fixTypeEverywhere, fixTypeEverywhere, fixTypeEverywhereTyped, fixTypeEverywhereTyped, fixTypeEverywhereTyped, fixTypeEverywhereTyped, getInputSchema, getOutputSchema, getRule, getVersionKey, onFail, writeAndRead, writeFixAndRead

    Methods inherited from class java.lang.Object

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

    • TRADES_PER_LEVEL

      private static final int TRADES_PER_LEVEL
      See Also:
    • LEVEL_XP_THRESHOLDS

      private static final int[] LEVEL_XP_THRESHOLDS
  • Constructor Details

    • VillagerRebuildLevelAndXpFix

      public VillagerRebuildLevelAndXpFix(com.mojang.datafixers.schemas.Schema outputSchema, boolean changesType)
  • Method Details

    • getMinXpPerLevel

      public static int getMinXpPerLevel(int level)
    • makeRule

      public com.mojang.datafixers.TypeRewriteRule makeRule()
      Specified by:
      makeRule in class com.mojang.datafixers.DataFix
    • addLevel

      private static com.mojang.datafixers.Typed<?> addLevel(com.mojang.datafixers.Typed<?> typed, int level)
    • addXpFromLevel

      private static com.mojang.datafixers.Typed<?> addXpFromLevel(com.mojang.datafixers.Typed<?> typed, int xp)