Files
Paper/paper-api/src/main/java/io/papermc/paper/datacomponent/BuildableDataComponent.java
Owen1212055 30b4dedabb DataComponent API
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.
2024-04-28 19:53:06 -04:00

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();
}