Skip to content

Change Art to an interface#11244

Closed
Machine-Maker wants to merge 3 commits intoPaperMC:masterfrom
Machine-Maker:feature/Art-interface
Closed

Change Art to an interface#11244
Machine-Maker wants to merge 3 commits intoPaperMC:masterfrom
Machine-Maker:feature/Art-interface

Conversation

@Machine-Maker
Copy link
Member

Fixes #11237

@Machine-Maker Machine-Maker requested a review from a team as a code owner August 12, 2024 00:14
@Test
public void testCraftArtToBukkit() {
- Map<Art, Holder<PaintingVariant>> cache = new EnumMap(Art.class);
+ Map<Art, Holder<PaintingVariant>> cache = new java.util.HashMap<>(); // Paper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the duplicate assertion even needed anymore?

Lulu13022002 added a commit to Lulu13022002/Paper that referenced this pull request Aug 12, 2024
Datapack made painting variant support is added in PaperMC#11244
Machine-Maker pushed a commit to Lulu13022002/Paper that referenced this pull request Aug 16, 2024
Datapack made painting variant support is added in PaperMC#11244
Machine-Maker added a commit that referenced this pull request Aug 16, 2024
* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in #11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
b0ykoe pushed a commit to InfernalSuite/AdvancedSlimePaper that referenced this pull request Aug 16, 2024
…1aac76a201

Handle custom registry elements properly (#11230)

* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in PaperMC/Paper#11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
kyngs pushed a commit to InfernalSuite/AdvancedSlimePaper that referenced this pull request Aug 19, 2024
…3a454545ab

[ci skip] Fix JavaDocs for HeightMap#MOTION_BLOCKING_NO_LEAVES (#11291)

Automatically updated to Paper commit: ba1b0162faaa7bf78d33162f6976586bb3049275
Allow server administrators to disable book size checks (#10457)

Automatically updated to Paper commit: dae906ba452e4a17779aa6438ccd6deb42d7f0df
Add getWorld method that uses adventure Key (#11199)

Automatically updated to Paper commit: 8fd3a67138b5d7a3a21e059eb3c3b766ffdfc281
[ci skip] Clean up book limits patch (#11297)

Automatically updated to Paper commit: be1078f5f2e28c1a1de99e9c96e4003c3f96f6e8
Use player file, not directory, when checking for offline player data

When trying to fall back to offline player data in onlide mode,
we need to use the player file. This fixes a mistake during
update where 'file' was used, but the new code uses 'file1'
for the player file.

Automatically updated to Paper commit: b4bc512cac4d75f9e366479c5d8fdcf4275c85ce
Fix entity limit patch deleting unnecessary entities

We need to continue the save loop, not break from it
when a limit is reached.

Automatically updated to Paper commit: 64c9ee6584ce15e5b486bdc7183fe902e22fddf3
Allow getting/setting the sign's editor uuid (#10637)

* Allow getting/setting the sign's editor uuid

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>

Automatically updated to Paper commit: 44017487a81534067fd17e2d5e8669e61e19d719
Fix CraftBukkit drag system (#10703)

Automatically updated to Paper commit: 8c3018a4b177aa0f7658d510bf7d19c5fa8e5b65
Fix Selector Arguments not working with permission (#11286)

Automatically updated to Paper commit: 57dd822393df78a4cb47f7a2c2d037dc2a77d5bd
Leashable API (#10961)

Automatically updated to Paper commit: 2e82fd2d2c1881665e27654977390fa48f5ec346
Add even more Enchantment API (#11115)

Automatically updated to Paper commit: 66a97cc929740475bc8dd192382c4ae59fdeace9
Update item data sanitization (#11227)

Automatically updated to Paper commit: 0e7361704a16c8386d829c26603f3e5c0bf72b39
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11284)

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4068c6aa PR-1053: Change docs for max power in FireworkMeta
6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API
5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml

CraftBukkit Changes:
7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports
93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta
5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API
11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml

Spigot Changes:
ca581228 Rebuild patches

Automatically updated to Paper commit: 75655ec1d34f344c7b0ba9f31f2ada87951d277d
Add Configuration for vertical Despawn Ranges (#11279)

Automatically updated to Paper commit: 52ae4ad4666b34d637f2de573ed03c02b0fc6a24
Migrate ArmorStand meta to using entity tag (#11107)

Automatically updated to Paper commit: d5ffc573dc17092ea2cfdd4ce14dac3e70b932f5
Implement more methods for horse inventories (#11147)

Automatically updated to Paper commit: 4829fbf6bd51e2dc86e2f190971c081aac76a201
Handle custom registry elements properly (#11230)

* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in PaperMC/Paper#11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>

Automatically updated to Paper commit: 78216fef26e454c78dff5e495f6ebe673be56900
Re-implement portalCreateRadius world config (#11267)

Automatically updated to Paper commit: e619744fbdc4963eed0b04c1e44bd1089ce50285
Allow skipping of world symlink validation (#11250)

Automatically updated to Paper commit: 534ab86010330ce3afa732910227585d0dc02d1e
[ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)

This reverts commit 1b8ab116edd5da15791de96aa462db90756848dc.

Automatically updated to Paper commit: 1b8ab116edd5da15791de96aa462db90756848dc
Add Configuration for vertical Despawn Ranges (#10440)

Automatically updated to Paper commit: ec55c11fc074929e4aa1a1ecdaef51da69dbf0be
Fix indestructable light blocks (#11275)

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>

Automatically updated to Paper commit: 95719832bf57ae523982d681cd219e8387c39955
Fix scanForLegacyEnderDragon world config (#11262)

Automatically updated to Paper commit: 81bfda87103e1a47ea184c5da119e79218a8dc1e
[ci skip] Specify rebase location in CONTRIBUTING (#11255)

* [ci skip] Specify rebase location in CONTRIBUTING

* Improve

* remove Paper-MojangAPI mention

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>

Automatically updated to Paper commit: fb530743e5c71cb4faba06339bdeb14a33e06a6a
Apply optimise collision checking in move packet handling patch

Automatically updated to Paper commit: bf5852a6151aa643b87bd0e0f9e3940f867064a3
Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268)

Automatically updated to Paper commit: 11b4ac7c659ffb7e4790b0856b14117b6d532200
Fix disableEndCredits world config (#11261)

Automatically updated to Paper commit: 9ab644ed290542a9e537d8f529bc6898a3da2e7d
Fix `TooltipContext.create` being wrong(#11254)

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>

Automatically updated to Paper commit: 7c9240f4a63b13be1fdcedbfb0270f9b49b75518
Improve standard messenger logging

Automatically updated to Paper commit: 1798e949e5727f376ccaee51873f21dcdedc9a5f
Fix BasicCommand suggestion arg count (#11241)

Automatically updated to Paper commit: 4a97ba3ea8cb449fe76ed1aef0b572e7cc01d542
Fix `setSendViewDistance`'s return (#11247)

Automatically updated to Paper commit: f97aff74b6f7fd4940c0c0b6cca3f8ac6e1afdef
[ci skip] Fix Effect javadocs (#11182)

Automatically updated to Paper commit: 098bd39092f50cb97a604c2f228f2af29666ca41
Remove arbitrary book page limit (#11228)

Automatically updated to Paper commit: ab0d24aa6f22308352eb363b09c992fc70de4143
Configuration for horizontal-only item merging (#11219)
@Machine-Maker Machine-Maker force-pushed the feature/Art-interface branch 2 times, most recently from b129a13 to fb0f188 Compare August 28, 2024 18:59
@Machine-Maker Machine-Maker force-pushed the feature/Art-interface branch 2 times, most recently from 4d62a92 to 0fb2eed Compare September 6, 2024 21:59
Copy link
Contributor

@Lulu13022002 Lulu13022002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a test in RegistryConstantsTest to make sure some constant are not missed

simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true),
simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true),
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false),
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, false),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this one data driven registry doesn't allow creation of custom key like others? the doc website could then be updated


SourceGenerator[] API = {
// built-in
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, false),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GameEvent has a registry event so the create method could be public i think

@Machine-Maker
Copy link
Member Author

Superceeded by #11561

@Machine-Maker Machine-Maker deleted the feature/Art-interface branch November 10, 2024 22:19
ComputerNerd100 pushed a commit to InfernalSuite/AdvancedSlimePaper that referenced this pull request Dec 20, 2024
Automatically updated to Paper commit: a8cb8e6745dab32139d954d732a3423a454545ab
[ci skip] Fix JavaDocs for HeightMap#MOTION_BLOCKING_NO_LEAVES (#11291)

Automatically updated to Paper commit: ba1b0162faaa7bf78d33162f6976586bb3049275
Allow server administrators to disable book size checks (#10457)

Automatically updated to Paper commit: dae906ba452e4a17779aa6438ccd6deb42d7f0df
Add getWorld method that uses adventure Key (#11199)

Automatically updated to Paper commit: 8fd3a67138b5d7a3a21e059eb3c3b766ffdfc281
[ci skip] Clean up book limits patch (#11297)

Automatically updated to Paper commit: be1078f5f2e28c1a1de99e9c96e4003c3f96f6e8
Use player file, not directory, when checking for offline player data

When trying to fall back to offline player data in onlide mode,
we need to use the player file. This fixes a mistake during
update where 'file' was used, but the new code uses 'file1'
for the player file.

Automatically updated to Paper commit: b4bc512cac4d75f9e366479c5d8fdcf4275c85ce
Fix entity limit patch deleting unnecessary entities

We need to continue the save loop, not break from it
when a limit is reached.

Automatically updated to Paper commit: 64c9ee6584ce15e5b486bdc7183fe902e22fddf3
Allow getting/setting the sign's editor uuid (#10637)

* Allow getting/setting the sign's editor uuid

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>

Automatically updated to Paper commit: 44017487a81534067fd17e2d5e8669e61e19d719
Fix CraftBukkit drag system (#10703)

Automatically updated to Paper commit: 8c3018a4b177aa0f7658d510bf7d19c5fa8e5b65
Fix Selector Arguments not working with permission (#11286)

Automatically updated to Paper commit: 57dd822393df78a4cb47f7a2c2d037dc2a77d5bd
Leashable API (#10961)

Automatically updated to Paper commit: 2e82fd2d2c1881665e27654977390fa48f5ec346
Add even more Enchantment API (#11115)

Automatically updated to Paper commit: 66a97cc929740475bc8dd192382c4ae59fdeace9
Update item data sanitization (#11227)

Automatically updated to Paper commit: 0e7361704a16c8386d829c26603f3e5c0bf72b39
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11284)

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
4068c6aa PR-1053: Change docs for max power in FireworkMeta
6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API
5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml

CraftBukkit Changes:
7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports
93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta
5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API
11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml

Spigot Changes:
ca581228 Rebuild patches

Automatically updated to Paper commit: 75655ec1d34f344c7b0ba9f31f2ada87951d277d
Add Configuration for vertical Despawn Ranges (#11279)

Automatically updated to Paper commit: 52ae4ad4666b34d637f2de573ed03c02b0fc6a24
Migrate ArmorStand meta to using entity tag (#11107)

Automatically updated to Paper commit: d5ffc573dc17092ea2cfdd4ce14dac3e70b932f5
Implement more methods for horse inventories (#11147)

Automatically updated to Paper commit: 4829fbf6bd51e2dc86e2f190971c081aac76a201
Handle custom registry elements properly (#11230)

* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in PaperMC/Paper#11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>

Automatically updated to Paper commit: 78216fef26e454c78dff5e495f6ebe673be56900
Re-implement portalCreateRadius world config (#11267)

Automatically updated to Paper commit: e619744fbdc4963eed0b04c1e44bd1089ce50285
Allow skipping of world symlink validation (#11250)

Automatically updated to Paper commit: 534ab86010330ce3afa732910227585d0dc02d1e
[ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)

This reverts commit 1b8ab116edd5da15791de96aa462db90756848dc.

Automatically updated to Paper commit: 1b8ab116edd5da15791de96aa462db90756848dc
Add Configuration for vertical Despawn Ranges (#10440)

Automatically updated to Paper commit: ec55c11fc074929e4aa1a1ecdaef51da69dbf0be
Fix indestructable light blocks (#11275)

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>

Automatically updated to Paper commit: 95719832bf57ae523982d681cd219e8387c39955
Fix scanForLegacyEnderDragon world config (#11262)

Automatically updated to Paper commit: 81bfda87103e1a47ea184c5da119e79218a8dc1e
[ci skip] Specify rebase location in CONTRIBUTING (#11255)

* [ci skip] Specify rebase location in CONTRIBUTING

* Improve

* remove Paper-MojangAPI mention

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>

Automatically updated to Paper commit: fb530743e5c71cb4faba06339bdeb14a33e06a6a
Apply optimise collision checking in move packet handling patch

Automatically updated to Paper commit: bf5852a6151aa643b87bd0e0f9e3940f867064a3
Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268)

Automatically updated to Paper commit: 11b4ac7c659ffb7e4790b0856b14117b6d532200
Fix disableEndCredits world config (#11261)

Automatically updated to Paper commit: 9ab644ed290542a9e537d8f529bc6898a3da2e7d
Fix `TooltipContext.create` being wrong(#11254)

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>

Automatically updated to Paper commit: 7c9240f4a63b13be1fdcedbfb0270f9b49b75518
Improve standard messenger logging

Automatically updated to Paper commit: 1798e949e5727f376ccaee51873f21dcdedc9a5f
Fix BasicCommand suggestion arg count (#11241)

Automatically updated to Paper commit: 4a97ba3ea8cb449fe76ed1aef0b572e7cc01d542
Fix `setSendViewDistance`'s return (#11247)

Automatically updated to Paper commit: f97aff74b6f7fd4940c0c0b6cca3f8ac6e1afdef
[ci skip] Fix Effect javadocs (#11182)

Automatically updated to Paper commit: 098bd39092f50cb97a604c2f228f2af29666ca41
Remove arbitrary book page limit (#11228)

Automatically updated to Paper commit: ab0d24aa6f22308352eb363b09c992fc70de4143
Configuration for horizontal-only item merging (#11219)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

IllegalArgumentException when using Painting#getArt() on custom painting variant

3 participants