Interface DataPatch

All Known Implementing Classes:
DataPatch.Assign, DataPatch.Flag, DataPatch.Remove

public sealed interface DataPatch permits DataPatch.Assign<T>, DataPatch.Flag, DataPatch.Remove
One pass-through change to an item's data components, applied without localization. The set of permitted subtypes may grow in a 7.x minor release. Code outside the framework must not switch over it exhaustively without a default branch.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Assigns a component value unchanged.
    static final record 
    Sets a flag component.
    static final record 
    Removes a prototype component.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.papermc.paper.datacomponent.DataComponentType
    Returns the component type to change.
  • Method Details

    • type

      io.papermc.paper.datacomponent.DataComponentType type()
      Returns the component type to change.