11package kr .toxicity .libraries .datacomponent .api ;
22
33import com .google .gson .JsonElement ;
4+ import net .kyori .adventure .text .Component ;
45import org .jetbrains .annotations .NotNull ;
56import org .jetbrains .annotations .Nullable ;
7+ import kr .toxicity .libraries .datacomponent .api .wrapper .*;
68
9+ import java .util .List ;
10+ import java .util .function .Supplier ;
11+
12+ import static kr .toxicity .libraries .datacomponent .api .NMS .nms ;
13+
14+ @ SuppressWarnings ("unused" )
715public interface DataComponentType <T > {
16+
17+ Supplier <DataComponentType <Integer >> MAX_STACK_SIZE = () -> nms ().maxStackSize ();
18+ Supplier <DataComponentType <Integer >> MAX_DAMAGE = () -> nms ().maxDamage ();
19+ Supplier <DataComponentType <Integer >> DAMAGE = () -> nms ().damage ();
20+ Supplier <DataComponentType <Component >> CUSTOM_NAME = () -> nms ().customName ();
21+ Supplier <DataComponentType <Component >> ITEM_NAME = () -> nms ().itemName ();
22+ Supplier <DataComponentType <ItemLore >> LORE = () -> nms ().lore ();
23+ Supplier <DataComponentType <Rarity >> RARITY = () -> nms ().rarity ();
24+ Supplier <DataComponentType <AdventureModePredicate >> CAN_PLACE_ON = () -> nms ().canPlaceOn ();
25+ Supplier <DataComponentType <AdventureModePredicate >> CAN_BREAK = () -> nms ().canBreak ();
26+ Supplier <DataComponentType <CustomModelData >> CUSTOM_MODEL_DATA = () -> nms ().customModelData ();
27+ Supplier <DataComponentType <Integer >> REPAIR_COST = () -> nms ().repairCost ();
28+ Supplier <DataComponentType <Unit >> CREATIVE_SLOT_LOCK = () -> nms ().creativeSlotLock ();
29+ Supplier <DataComponentType <Boolean >> ENCHANTMENT_GLINT_OVERRIDE = () -> nms ().enchantmentGlintOverride ();
30+ Supplier <DataComponentType <Unit >> INTANGIBLE_PROJECTILE = () -> nms ().intangibleProjectile ();
31+ Supplier <DataComponentType <FoodProperties >> FOOD = () -> nms ().food ();
32+ Supplier <DataComponentType <Unit >> FIRE_RESISTANT = () -> nms ().fireResistant ();
33+ Supplier <DataComponentType <Tool >> TOOL = () -> nms ().tool ();
34+ Supplier <DataComponentType <DyedItemColor >> DYED_COLOR = () -> nms ().dyedColor ();
35+ Supplier <DataComponentType <MapItemColor >> MAP_COLOR = () -> nms ().mapColor ();
36+ Supplier <DataComponentType <MapId >> MAP_ID = () -> nms ().mapId ();
37+ Supplier <DataComponentType <BundleContents >> BUNDLE_CONTENTS = () -> nms ().bundleContents ();
38+ Supplier <DataComponentType <PotionContents >> POTION_CONTENTS = () -> nms ().potionContents ();
39+ Supplier <DataComponentType <SuspiciousStewEffects >> SUSPICIOUS_STEW_EFFECTS = () -> nms ().suspiciousStewEffects ();
40+ Supplier <DataComponentType <WritableBookContent >> WRITABLE_BOOK_CONTENT = () -> nms ().writableBookContent ();
41+ Supplier <DataComponentType <WrittenBookContent >> WRITTEN_BOOK_CONTENT = () -> nms ().writtenBookContent ();
42+ Supplier <DataComponentType <ArmorTrim >> TRIM = () -> nms ().trim ();
43+ Supplier <DataComponentType <BlockItemStateProperties >> BLOCK_STATE = () -> nms ().blockState ();
44+ Supplier <DataComponentType <CustomData >> ENTITY_DATA = () -> nms ().entityData ();
45+ Supplier <DataComponentType <CustomData >> BUCKET_ENTITY_DATA = () -> nms ().bucketEntityData ();
46+ Supplier <DataComponentType <CustomData >> BLOCK_ENTITY_DATA = () -> nms ().blockEntityData ();
47+ Supplier <DataComponentType <Integer >> OMINOUS_BOTTLE_AMPLIFIER = () -> nms ().ominousBottleAmplifier ();
48+ Supplier <DataComponentType <List <String >>> RECIPES = () -> nms ().recipes ();
49+
850 static Registry <? extends DataComponentType <?>> registry () {
951 return NMS .nms ().componentRegistry ();
1052 }
53+
1154 @ NotNull String key ();
1255 @ NotNull Codec <T > codec ();
1356
@@ -16,4 +59,5 @@ static Registry<? extends DataComponentType<?>> registry() {
1659
1760 @ Nullable T setToJson (@ NotNull ItemAdapter adapter , @ Nullable JsonElement element );
1861 @ Nullable JsonElement getToJson (@ NotNull ItemAdapter adapter );
62+
1963}
0 commit comments