@@ -24,10 +24,10 @@ index 647f6a1ec1f9d3c203b41f90a99bfd415bf67366..9b39e33514b15a9d07104e2ad826d0da
24
24
* Built-in registry for cat variants.
25
25
diff --git a/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java
26
26
new file mode 100644
27
- index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a428bdc5ad9
27
+ index 0000000000000000000000000000000000000000..f092077453cb13dd8d849550896c2ef1cfa81b7a
28
28
--- /dev/null
29
29
+++ b/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java
30
- @@ -0,0 +1,332 @@
30
+ @@ -0,0 +1,331 @@
31
31
+ package io.papermc.paper.registry.data;
32
32
+
33
33
+ import io.papermc.paper.registry.RegistryBuilder;
@@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
177
177
+ * sharpness enchantment.
178
178
+ *
179
179
+ * @param description the description component.
180
- + * @return this builder.
180
+ + * @return this builder instance .
181
181
+ */
182
182
+ @Contract(value = "_ -> this", mutates = "this")
183
183
+ Builder description(Component description);
@@ -191,7 +191,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
191
191
+ * {@link io.papermc.paper.registry.keys.tags.ItemTypeTagKeys#ENCHANTABLE_SWORD}.
192
192
+ *
193
193
+ * @param supportedItems the registry key set representing the supported items.
194
- + * @return this builder.
194
+ + * @return this builder instance .
195
195
+ * @see RegistrySet#keySet(RegistryKey, TypedKey[])
196
196
+ * @see io.papermc.paper.registry.event.RegistryFreezeEvent#getOrCreateTag(TagKey)
197
197
+ */
@@ -212,7 +212,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
212
212
+ * which enchantments can even show up in an enchantment table.
213
213
+ *
214
214
+ * @param primaryItems the registry key set representing the primary items.
215
- + * @return this builder.
215
+ + * @return this builder instance .
216
216
+ * @see RegistrySet#keySet(RegistryKey, TypedKey[])
217
217
+ * @see io.papermc.paper.registry.event.RegistryFreezeEvent#getOrCreateTag(TagKey)
218
218
+ */
@@ -223,7 +223,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
223
223
+ * Configures the weight of this enchantment used by the weighted random when selecting enchantments.
224
224
+ *
225
225
+ * @param weight the weight value.
226
- + * @return this builder.
226
+ + * @return this builder instance .
227
227
+ * @see <a href="https://minecraft.wiki/w/Enchanting">https://minecraft.wiki/w/Enchanting</a> for examplary weights.
228
228
+ */
229
229
+ @Contract(value = "_ -> this", mutates = "this")
@@ -233,7 +233,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
233
233
+ * Configures the maximum level this enchantment can have when applied.
234
234
+ *
235
235
+ * @param maxLevel the maximum level.
236
- + * @return this builder.
236
+ + * @return this builder instance .
237
237
+ */
238
238
+ @Contract(value = "_ -> this", mutates = "this")
239
239
+ Builder maxLevel(@Range(from = 1, to = 255) int maxLevel);
@@ -244,7 +244,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
244
244
+ * Note that a cost is not directly related to the consumed xp.
245
245
+ *
246
246
+ * @param minimumCost the enchantment cost.
247
- + * @return this builder.
247
+ + * @return this builder instance .
248
248
+ * @see <a href="https://minecraft.wiki/w/Enchanting/Levels">https://minecraft.wiki/w/Enchanting/Levels</a> for
249
249
+ * examplary costs.
250
250
+ */
@@ -257,7 +257,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
257
257
+ * Note that a cost is not directly related to the consumed xp.
258
258
+ *
259
259
+ * @param maximumCost the enchantment cost.
260
- + * @return this builder.
260
+ + * @return this builder instance .
261
261
+ * @see <a href="https://minecraft.wiki/w/Enchanting/Levels">https://minecraft.wiki/w/Enchanting/Levels</a> for
262
262
+ * examplary costs.
263
263
+ */
@@ -272,7 +272,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
272
272
+ * </p>
273
273
+ *
274
274
+ * @param anvilCost the anvil cost of this enchantment
275
- + * @return this builder.
275
+ + * @return this builder instance .
276
276
+ * @see Enchantment#getAnvilCost()
277
277
+ */
278
278
+ @Contract(value = "_ -> this", mutates = "this")
@@ -285,7 +285,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
285
285
+ * groups, the enchantment's effects, like attribute modifiers, will not activate.
286
286
+ *
287
287
+ * @param activeSlots a list of equipment slot groups.
288
- + * @return this builder.
288
+ + * @return this builder instance .
289
289
+ * @see Enchantment#getActiveSlotGroups()
290
290
+ */
291
291
+ @Contract(value = "_ -> this", mutates = "this")
@@ -300,7 +300,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
300
300
+ * groups, the enchantment's effects, like attribute modifiers, will not activate.
301
301
+ *
302
302
+ * @param activeSlots a list of equipment slot groups.
303
- + * @return this builder.
303
+ + * @return this builder instance .
304
304
+ * @see Enchantment#getActiveSlotGroups()
305
305
+ */
306
306
+ @Contract(value = "_ -> this", mutates = "this")
@@ -315,7 +315,7 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
315
315
+ * Defaults to an empty set allowing this enchantment to be applied regardless of other enchantments.
316
316
+ *
317
317
+ * @param exclusiveWith a registry set of enchantments exclusive to this one.
318
- + * @return this builder.
318
+ + * @return this builder instance .
319
319
+ * @see RegistrySet#keySet(RegistryKey, TypedKey[])
320
320
+ * @see io.papermc.paper.registry.event.RegistryFreezeEvent#getOrCreateTag(TagKey)
321
321
+ */
@@ -358,7 +358,6 @@ index 0000000000000000000000000000000000000000..d0d19a4bb2ba0e92710861b106777a42
358
358
+ return new Impl(baseCost, additionalPerLevelCost);
359
359
+ }
360
360
+ }
361
- +
362
361
+ }
363
362
diff --git a/src/main/java/io/papermc/paper/registry/data/GameEventRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/GameEventRegistryEntry.java
364
363
new file mode 100644
@@ -417,10 +416,10 @@ index 0000000000000000000000000000000000000000..980fe12b75258b51cc2498590cadb9de
417
416
+ }
418
417
diff --git a/src/main/java/io/papermc/paper/registry/data/PaintingVariantRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/PaintingVariantRegistryEntry.java
419
418
new file mode 100644
420
- index 0000000000000000000000000000000000000000..b8d133afa82da1b5b9e7a18e1c332ae3aefea50d
419
+ index 0000000000000000000000000000000000000000..4e2c99acd7dc307981ba8e33a62835f0f29fd73e
421
420
--- /dev/null
422
421
+++ b/src/main/java/io/papermc/paper/registry/data/PaintingVariantRegistryEntry.java
423
- @@ -0,0 +1,135 @@
422
+ @@ -0,0 +1,131 @@
424
423
+ package io.papermc.paper.registry.data;
425
424
+
426
425
+ import io.papermc.paper.registry.RegistryBuilder;
@@ -443,43 +442,41 @@ index 0000000000000000000000000000000000000000..b8d133afa82da1b5b9e7a18e1c332ae3
443
442
+ public interface PaintingVariantRegistryEntry {
444
443
+
445
444
+ /**
446
- + * Provides the width of this variant in blocks.
445
+ + * Provides the width of this painting in blocks.
447
446
+ *
448
- + * @return the width
447
+ + * @return the width.
449
448
+ * @see Art#getBlockWidth()
450
449
+ */
451
- + @Range(from = 1, to = 16)
452
- + int width();
450
+ + @Range(from = 1, to = 16) int width();
453
451
+
454
452
+ /**
455
- + * Provides the height of this variant in blocks.
453
+ + * Provides the height of this painting in blocks.
456
454
+ *
457
- + * @return the height
455
+ + * @return the height.
458
456
+ * @see Art#getBlockHeight()
459
457
+ */
460
- + @Range(from = 1, to = 16)
461
- + int height();
458
+ + @Range(from = 1, to = 16) int height();
462
459
+
463
460
+ /**
464
461
+ * Provides the title of the painting visible in the creative inventory.
465
462
+ *
466
- + * @return the title
463
+ + * @return the title.
467
464
+ * @see Art#title()
468
465
+ */
469
466
+ @Nullable Component title();
470
467
+
471
468
+ /**
472
469
+ * Provides the author of the painting visible in the creative inventory.
473
470
+ *
474
- + * @return the author
471
+ + * @return the author.
475
472
+ * @see Art#author()
476
473
+ */
477
474
+ @Nullable Component author();
478
475
+
479
476
+ /**
480
- + * Provides the assetId of the variant , which is the location of the sprite to use.
477
+ + * Provides the asset id of the painting , which is the location of the sprite to use.
481
478
+ *
482
- + * @return the asset id
479
+ + * @return the asset id.
483
480
+ * @see Art#assetId()
484
481
+ */
485
482
+ Key assetId();
@@ -501,30 +498,30 @@ index 0000000000000000000000000000000000000000..b8d133afa82da1b5b9e7a18e1c332ae3
501
498
+ /**
502
499
+ * Sets the width of the painting in blocks.
503
500
+ *
504
- + * @param width the width in blocks
505
- + * @return this builder instance
501
+ + * @param width the width in blocks.
502
+ + * @return this builder instance.
506
503
+ * @see PaintingVariantRegistryEntry#width()
507
504
+ * @see Art#getBlockWidth()
508
505
+ */
509
506
+ @Contract(value = "_ -> this", mutates = "this")
510
- + Builder width(@Range(from = 0 , to = 16) int width);
507
+ + Builder width(@Range(from = 1 , to = 16) int width);
511
508
+
512
509
+ /**
513
510
+ * Sets the height of the painting in blocks.
514
511
+ *
515
- + * @param height the height in blocks
516
- + * @return this builder instance
512
+ + * @param height the height in blocks.
513
+ + * @return this builder instance.
517
514
+ * @see PaintingVariantRegistryEntry#height()
518
515
+ * @see Art#getBlockHeight()
519
516
+ */
520
517
+ @Contract(value = "_ -> this", mutates = "this")
521
- + Builder height(@Range(from = 0 , to = 16) int height);
518
+ + Builder height(@Range(from = 1 , to = 16) int height);
522
519
+
523
520
+ /**
524
521
+ * Sets the title of the painting.
525
522
+ *
526
- + * @param title the title
527
- + * @return this builder instance
523
+ + * @param title the title.
524
+ + * @return this builder instance.
528
525
+ * @see PaintingVariantRegistryEntry#title()
529
526
+ * @see Art#title()
530
527
+ */
@@ -534,27 +531,25 @@ index 0000000000000000000000000000000000000000..b8d133afa82da1b5b9e7a18e1c332ae3
534
531
+ /**
535
532
+ * Sets the author of the painting.
536
533
+ *
537
- + * @param author the author
538
- + * @return this builder instance
534
+ + * @param author the author.
535
+ + * @return this builder instance.
539
536
+ * @see PaintingVariantRegistryEntry#author()
540
537
+ * @see Art#author()
541
538
+ */
542
539
+ @Contract(value = "_ -> this", mutates = "this")
543
540
+ Builder author(@Nullable Component author);
544
541
+
545
542
+ /**
546
- + * Sets the assetId of the variant , which is the location of the sprite to use.
543
+ + * Sets the asset id of the painting , which is the location of the sprite to use.
547
544
+ *
548
- + * @param assetId the asset id
549
- + * @return this builder instance
545
+ + * @param assetId the asset id.
546
+ + * @return this builder instance.
550
547
+ * @see PaintingVariantRegistryEntry#assetId()
551
548
+ * @see Art#assetId()
552
549
+ */
553
550
+ @Contract(value = "_ -> this", mutates = "this")
554
551
+ Builder assetId(Key assetId);
555
- +
556
552
+ }
557
- +
558
553
+ }
559
554
diff --git a/src/main/java/io/papermc/paper/registry/data/package-info.java b/src/main/java/io/papermc/paper/registry/data/package-info.java
560
555
new file mode 100644
0 commit comments