Interface IPatternDetailsDecoder


public interface IPatternDetailsDecoder
Allows mod to decode their IPatternDetails from their item stacks. This is required for custom patterns, otherwise the crafting CPU can't properly persist them. Register a single instance to PatternDetailsHelper.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable IPatternDetails
    decodePattern(AEItemKey what, net.minecraft.world.level.Level level)
     
    @Nullable IPatternDetails
    decodePattern(net.minecraft.world.item.ItemStack what, net.minecraft.world.level.Level level, boolean tryRecovery)
    Decodes a pattern stored in a stack.
    boolean
    isEncodedPattern(net.minecraft.world.item.ItemStack stack)
     
  • Method Details

    • isEncodedPattern

      boolean isEncodedPattern(net.minecraft.world.item.ItemStack stack)
    • decodePattern

      @Nullable @Nullable IPatternDetails decodePattern(AEItemKey what, net.minecraft.world.level.Level level)
    • decodePattern

      @Nullable @Nullable IPatternDetails decodePattern(net.minecraft.world.item.ItemStack what, net.minecraft.world.level.Level level, boolean tryRecovery)
      Decodes a pattern stored in a stack. Can attempt to recover a pattern hat has broken by recipe IDs being changed by other mods. Recovery will modify the given item stack.