Exposes the data component logic used by vanilla ItemStack to API consumers as a version-specific API. The types and methods introduced by this patch do not follow the general API deprecation contracts and will be adapted to each new minecraft release without backwards compatibility measures.
20 lines
525 B
Java
20 lines
525 B
Java
package io.papermc.paper.datacomponent;
|
|
|
|
import org.jetbrains.annotations.ApiStatus;
|
|
import org.jetbrains.annotations.Contract;
|
|
import org.jspecify.annotations.NullMarked;
|
|
|
|
@NullMarked
|
|
@ApiStatus.Experimental
|
|
@ApiStatus.NonExtendable
|
|
public interface BuildableDataComponent<C extends BuildableDataComponent<C, B>, B extends DataComponentBuilder<C>> {
|
|
|
|
/**
|
|
* Creates a new builder from this data component.
|
|
*
|
|
* @return a new builder
|
|
*/
|
|
@Contract(value = "-> new", pure = true)
|
|
B toBuilder();
|
|
}
|