Class EntityVariantFix

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

public class EntityVariantFix extends NamedEntityFix
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
     
    private final IntFunction<String>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntityVariantFix(com.mojang.datafixers.schemas.Schema pOutputSchema, String pName, com.mojang.datafixers.DSL.TypeReference pType, String pEntityName, String pFieldName, IntFunction<String> pIdConversions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.mojang.datafixers.Typed<?>
    fix(com.mojang.datafixers.Typed<?> pTyped)
     
    private static <T> com.mojang.serialization.Dynamic<T>
    updateAndRename(com.mojang.serialization.Dynamic<T> pDynamic, String pFieldName, String pNewFieldName, Function<com.mojang.serialization.Dynamic<T>,com.mojang.serialization.Dynamic<T>> pFixer)
     

    Methods inherited from class net.minecraft.util.datafix.fixes.NamedEntityFix

    makeRule

    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

  • Constructor Details

    • EntityVariantFix

      public EntityVariantFix(com.mojang.datafixers.schemas.Schema pOutputSchema, String pName, com.mojang.datafixers.DSL.TypeReference pType, String pEntityName, String pFieldName, IntFunction<String> pIdConversions)
  • Method Details

    • updateAndRename

      private static <T> com.mojang.serialization.Dynamic<T> updateAndRename(com.mojang.serialization.Dynamic<T> pDynamic, String pFieldName, String pNewFieldName, Function<com.mojang.serialization.Dynamic<T>,com.mojang.serialization.Dynamic<T>> pFixer)
    • fix

      protected com.mojang.datafixers.Typed<?> fix(com.mojang.datafixers.Typed<?> pTyped)
      Specified by:
      fix in class NamedEntityFix