39
39
import io .papermc .paper .datacomponent .item .WrittenBookContent ;
40
40
import io .papermc .paper .item .MapPostProcessing ;
41
41
import java .util .List ;
42
+ import io .papermc .paper .registry .tag .TagKey ;
42
43
import net .kyori .adventure .key .Key ;
43
44
import net .kyori .adventure .text .Component ;
45
+ import org .bukkit .Art ;
44
46
import org .bukkit .DyeColor ;
45
47
import org .bukkit .FireworkEffect ;
46
48
import org .bukkit .MusicInstrument ;
47
49
import org .bukkit .NamespacedKey ;
48
50
import org .bukkit .Registry ;
51
+ import org .bukkit .block .banner .PatternType ;
52
+ import org .bukkit .entity .Axolotl ;
53
+ import org .bukkit .entity .Cat ;
54
+ import org .bukkit .entity .Chicken ;
55
+ import org .bukkit .entity .Cow ;
56
+ import org .bukkit .entity .Fox ;
57
+ import org .bukkit .entity .Frog ;
58
+ import org .bukkit .entity .Horse ;
59
+ import org .bukkit .entity .Llama ;
60
+ import org .bukkit .entity .MushroomCow ;
61
+ import org .bukkit .entity .Painting ;
62
+ import org .bukkit .entity .Parrot ;
63
+ import org .bukkit .entity .Pig ;
64
+ import org .bukkit .entity .Rabbit ;
65
+ import org .bukkit .entity .Salmon ;
66
+ import org .bukkit .entity .TropicalFish ;
67
+ import org .bukkit .entity .Villager ;
68
+ import org .bukkit .entity .Wolf ;
49
69
import org .bukkit .inventory .ItemRarity ;
70
+ import org .bukkit .inventory .meta .trim .TrimMaterial ;
50
71
import org .checkerframework .checker .index .qual .NonNegative ;
51
72
import org .checkerframework .checker .index .qual .Positive ;
52
73
import org .checkerframework .common .value .qual .IntRange ;
@@ -144,15 +165,6 @@ public final class DataComponentTypes {
144
165
* Controls the minecraft:custom_model_data property in the item model.
145
166
*/
146
167
public static final DataComponentType .Valued <CustomModelData > CUSTOM_MODEL_DATA = valued ("custom_model_data" );
147
- /**
148
- * If set, disables 'additional' tooltip part which comes from the item type
149
- * (e.g. content of a shulker).
150
- */
151
- public static final DataComponentType .NonValued HIDE_ADDITIONAL_TOOLTIP = unvalued ("hide_additional_tooltip" );
152
- /**
153
- * If set, it will completely hide whole item tooltip (that includes item name).
154
- */
155
- public static final DataComponentType .NonValued HIDE_TOOLTIP = unvalued ("hide_tooltip" );
156
168
/**
157
169
* The additional experience cost required to modify an item in an Anvil.
158
170
* If not present, has an implicit default value of: {@code 0}.
@@ -243,6 +255,7 @@ public final class DataComponentTypes {
243
255
* or potion applied to a Tipped Arrow.
244
256
*/
245
257
public static final DataComponentType .Valued <PotionContents > POTION_CONTENTS = valued ("potion_contents" );
258
+ public static final DataComponentType .Valued <Float > POTION_DURATION_SCALE = valued ("potion_duration_scale" );
246
259
/**
247
260
* Holds the effects that will be applied when consuming Suspicious Stew.
248
261
*/
@@ -267,11 +280,14 @@ public final class DataComponentTypes {
267
280
* Holds the instrument type used by a Goat Horn.
268
281
*/
269
282
public static final DataComponentType .Valued <MusicInstrument > INSTRUMENT = valued ("instrument" );
283
+ // this is a either holder, but due to legacy item loading
284
+ public static final DataComponentType .Valued <TrimMaterial > PROVIDES_TRIM_MATERIAL = valued ("provides_trim_material" );
270
285
/**
271
286
* Controls the amplifier amount for an Ominous Bottle's Bad Omen effect.
272
287
*/
273
288
public static final DataComponentType .Valued <OminousBottleAmplifier > OMINOUS_BOTTLE_AMPLIFIER = valued ("ominous_bottle_amplifier" );
274
289
public static final DataComponentType .Valued <JukeboxPlayable > JUKEBOX_PLAYABLE = valued ("jukebox_playable" );
290
+ public static final DataComponentType .Valued <TagKey <PatternType >> PROVIDES_BANNER_PATTERNS = valued ("provides_banner_patterns" );
275
291
/**
276
292
* List of recipes that should be unlocked when using the Knowledge Book item.
277
293
*/
@@ -329,6 +345,33 @@ public final class DataComponentTypes {
329
345
* Holds the unresolved loot table and seed of a container-like block.
330
346
*/
331
347
public static final DataComponentType .Valued <SeededContainerLoot > CONTAINER_LOOT = valued ("container_loot" );
348
+ public static final DataComponentType .Valued <Key > BREAK_SOUND = valued ("break_sound" );
349
+ public static final DataComponentType .Valued <Villager .Type > VILLAGER_VARIANT = valued ("villager/variant" );
350
+ public static final DataComponentType .Valued <Wolf .Variant > WOLF_VARIANT = valued ("wolf/variant" );
351
+ // public static final DataComponentType.Valued<Holder<WolfSoundVariant>> WOLF_SOUND_VARIANT = valued("wolf/sound_variant");
352
+ public static final DataComponentType .Valued <DyeColor > WOLF_COLLAR = valued ("wolf/collar" );
353
+ public static final DataComponentType .Valued <Fox .Type > FOX_VARIANT = valued ("fox/variant" );
354
+ public static final DataComponentType .Valued <Salmon .Variant > SALMON_SIZE = valued ("salmon/size" );
355
+ public static final DataComponentType .Valued <Parrot .Variant > PARROT_VARIANT = valued ("parrot/variant" );
356
+ public static final DataComponentType .Valued <TropicalFish .Pattern > TROPICAL_FISH_PATTERN = valued ("tropical_fish/pattern" );
357
+ public static final DataComponentType .Valued <DyeColor > TROPICAL_FISH_BASE_COLOR = valued ("tropical_fish/base_color" );
358
+ public static final DataComponentType .Valued <DyeColor > TROPICAL_FISH_PATTERN_COLOR = valued ("tropical_fish/pattern_color" );
359
+ public static final DataComponentType .Valued <MushroomCow .Variant > MOOSHROOM_VARIANT = valued ("mooshroom/variant" );
360
+ public static final DataComponentType .Valued <Rabbit .Type > RABBIT_VARIANT = valued ("rabbit/variant" );
361
+ public static final DataComponentType .Valued <Pig .Variant > PIG_VARIANT = valued ("pig/variant" );
362
+ public static final DataComponentType .Valued <Cow .Variant > COW_VARIANT = valued ("cow/variant" );
363
+ // TODO: This is a eitherholder? Why specifically the chicken?? Oh wait this is prolly for chicken egg cause legacy item loading
364
+ public static final DataComponentType .Valued <Chicken .Variant > CHICKEN_VARIANT = valued ("chicken/variant" );
365
+ public static final DataComponentType .Valued <Frog .Variant > FROG_VARIANT = valued ("frog/variant" );
366
+ public static final DataComponentType .Valued <Horse .Style > HORSE_VARIANT = valued ("horse/variant" );
367
+ public static final DataComponentType .Valued <Art > PAINTING_VARIANT = valued ("painting/variant" );
368
+ public static final DataComponentType .Valued <Llama .Color > LLAMA_VARIANT = valued ("llama/variant" );
369
+ public static final DataComponentType .Valued <Axolotl .Variant > AXOLOTL_VARIANT = valued ("axolotl/variant" );
370
+ public static final DataComponentType .Valued <Cat .Type > CAT_VARIANT = valued ("cat/variant" );
371
+ public static final DataComponentType .Valued <DyeColor > CAT_COLLAR = valued ("cat/collar" );
372
+ public static final DataComponentType .Valued <DyeColor > SHEEP_COLOR = valued ("sheep/color" );
373
+ public static final DataComponentType .Valued <DyeColor > SHULKER_COLOR = valued ("shulker/color" );
374
+
332
375
333
376
private static DataComponentType .NonValued unvalued (final String name ) {
334
377
return (DataComponentType .NonValued ) requireNonNull (Registry .DATA_COMPONENT_TYPE .get (NamespacedKey .minecraft (name )), name + " unvalued data component type couldn't be found, this is a bug." );
0 commit comments