package net.minecraft.core.component; import org.jetbrains.annotations.Nullable; public interface DataComponentHolder { DataComponentMap getComponents(); @Nullable default T get(DataComponentType component) { return this.getComponents().get(component); } default T getOrDefault(DataComponentType component, T defaultValue) { return this.getComponents().getOrDefault(component, defaultValue); } default boolean has(DataComponentType component) { return this.getComponents().has(component); } }