483 Commits

Author SHA1 Message Date
md_5
f4d977e794
Simplify texture updating in CraftMetaSkull 2023-10-21 13:39:52 +11:00
DerFrZocker
71b0135cc7
SPIGOT-5753: Back PotionType by a minecraft registry 2023-10-09 20:22:53 +11:00
md_5
ad0e574345
SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag 2023-10-09 07:16:14 +11:00
Bjarne Koll
f0661c3514
#1230: Move unstructured PDC NBT serialisation to SNBT
The initial implementation of the CraftNBTTagConfigSerialiser attempted
to represent the entire NBT tree in yaml. While the tree structure
itself is nicely represented, the values and their respective types
become increasingly difficult to properly store in the context of
snakeyml/yml in general.

This is mainly due to the fact that nbt offers a lot of different types
compared to yaml, specifically the primitive arrays and different
floating point values are troublesome as they require parsing via mojang
parsers due to their custom format.

To build a future proof system for unstructured nbt in spigot yml,
this commit moves the entire serialisation fully into SNBT,
producing a single string as output rather than a full yml tree.
SNBT remains easily readable and editable for server owners, which was
one of the main criteria during the initial implementation of the
serialiser (preventing the use of bas64ed gzipped nbt bytes), while also
completely using mojangs parsing, eliminating any need for custom
parsing logic in spigot.

Additionally, a string allows for very straight forward handling of
legacy data by simply parsing strings as SNBT and maps/yml trees as
legacy content, depending on what type snakeyml produces after parsing
the yml content, removing the need for a versioning schema.
2023-09-24 10:12:19 +10:00
md_5
f0702775c3
SPIGOT-7486: Alternate approach to null profile names 2023-09-22 07:36:30 +10:00
DerFrZocker
02d4907887
#1250: Standardize and centralize Bukkit / Minecraft registry conversion 2023-09-22 03:02:16 +10:00
md_5
28c1023286
Update to Minecraft 1.20.2 2023-09-22 02:40:00 +10:00
DerFrZocker
10219df3a6
#1248: Load GameEvent and MusicInstrument from registry 2023-09-02 12:55:23 +10:00
md_5
4be756ecb4
SPIGOT-7445: Fix opening smithing inventory 2023-07-31 07:04:27 +10:00
Jishuna
52faa6b322
#1224: Add ItemFactory#getSpawnEgg 2023-07-18 21:28:02 +10:00
md_5
31fe848d6e
All smithing inventories are now the new smithing inventory 2023-07-01 09:35:39 +10:00
DerFrZocker
fcff84de91 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 2023-06-17 09:53:31 +00:00
Doc
676969d016
SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory 2023-06-17 06:44:22 +10:00
md_5
6962456f98
Fix unintended change to playSound contract and various other issues 2023-06-12 21:29:41 +10:00
Doc
40945171bf
#1182: Consolidate Preconditions use and minor cleanup 2023-06-12 19:41:02 +10:00
md_5
f3b2b22103
SPIGOT-7376: Exception with getBlockData when hasBlockData is false 2023-06-08 21:19:44 +10:00
md_5
e1188ed3a2
Update to Minecraft 1.20 2023-06-08 01:30:00 +10:00
Y2Kwastaken
a7cfc778fd
#1176: Add InventoryView#setTitle 2023-05-04 18:52:18 +10:00
blablubbabc
10f866759e
SPIGOT-6308: Deprecate the location name property of map items
This property does not have the expected effect.
2023-04-17 19:33:17 +10:00
Parker Hawke
50ee87fbcb SPIGOT-7333: Correctly handle null in ColorableArmorMeta#setColor() 2023-04-09 22:22:49 +00:00
Parker Hawke
1eb88374e1
#1147: Add experimental armor trim API 2023-04-07 16:51:00 +10:00
Parker Hawke
93813509b6
SPIGOT-7309: Add API for jukebox inventories
Also fixes a crash when inserting music discs into jukeboxes with a Dropper
2023-03-23 20:55:14 +11:00
md_5
bcedf28a1b
Update to Minecraft 1.19.4 2023-03-15 03:30:00 +11:00
blablubbabc
086d8dc8ac
SPIGOT-7268: CraftMetaPotion reads ShowParticles and ShowIcon properties incorrectly 2023-02-20 19:34:20 +11:00
md_5
7dcb59b8e2
Avoid switch on material in previous commit
See 9c7e65d17a4ed6c3d73935027bdbb9ea9d3c2965 for further info
2023-01-12 19:51:51 +11:00
byquanton
4768df7366
SPIGOT-7034: Add methods for set/get instrument in Goat Horn 2023-01-08 20:36:10 +11:00
Parker Hawke
941d7e954f
SPIGOT-7225: FireworkMeta#getPower() can throw a NullPointerException for items with no power set 2023-01-03 08:04:16 +11:00
Doc
ae8f5fc025
#1125: Add support for NoteBlock sounds in Skulls 2022-12-23 12:26:06 +11:00
md_5
0a1c89e4b1
SPIGOT-7212: Allow negative firework power 2022-12-23 11:46:35 +11:00
Doc
676441aac3
#1121: Handle additional missing SpawnEggs in MetaSpawnEgg 2022-12-08 17:50:40 +11:00
Doc
e85280e020
Handle missing SpawnEggs in MetaSpawnEgg 2022-12-07 19:27:20 -03:00
md_5
19e6be0209
Update to Minecraft 1.19.3 2022-12-08 03:00:00 +11:00
md_5
f43634ae43
SPIGOT-7170: Cannot set slots in custom smithing inventory 2022-10-28 20:33:21 +11:00
Doc
982364797f
SPIGOT-7174: Avoid adding air to CraftMetaBundle 2022-10-28 19:57:22 +11:00
md_5
aaf484f6fd
SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 2022-10-02 09:13:14 +11:00
Parker Hawke
b7e9f1c8b9
SPIGOT-7146: Reduce use of Material switch in ItemMeta
The Java compiler expands switch statements into a synthetic method that generates an int array with the enum's ordinal. For small enums this is fine, but with an enum as large as Material, this can add over one hundred thousand additional bytes of data. This unnecessarily increases CraftBukkit's overall file size by over 2MB. Where possible, simple conditions are returned. In cases where more than 2 constants are referenced, a HashSet is used (as opposed to an EnumSet which generates a large backing array into memory).
2022-09-11 10:26:21 +10:00
blablubbabc
d12768f755
#1090: Remove no longer needed world reference from CraftMerchantCustom 2022-07-25 18:00:57 +10:00
blablubbabc
7550f6854e
SPIGOT-7115: Support hex color codes in custom merchant inventory titles 2022-07-25 18:00:55 +10:00
md_5
64c15270e7
Update to Minecraft 1.19 2022-06-08 02:00:00 +10:00
Parker Hawke
d65d14307b
#975: Add method to read ItemStack input 2022-04-15 12:54:08 +10:00
md_5
e9f972d674
Improve CreativeCategory conversion 2022-03-19 09:59:56 +11:00
Parker Hawke
c269824921
#1034: Fix exception on init of CraftCreativeCategory 2022-03-19 09:59:56 +11:00
blablubbabc
2c47af0cb0
SPIGOT-6963: CraftMetaBlockState#getBlockState applied TileEntity ids without the minecraft namespace prefix.
This was able to cause issues when ItemStacks are being compared.
2022-03-15 07:30:53 +11:00
DerFrZocker
59733a2e9c
SPIGOT-6961: Actually return a copy of the ItemMeta 2022-03-13 06:58:41 +11:00
Parker Hawke
86292d3e08
#876: Add CreativeCategory API for Materials 2022-03-03 18:55:51 +11:00
DerFrZocker
6a54e5d374
#1012: Always save as skull owner and not as internal data 2022-02-14 08:20:37 +11:00
blablubbabc
8f361ecec0
#1002: Add Player Profile API
Slight changes may occur as this API is stabilized.

This PR is based on work previously done by DerFrZocker in #938.
2022-02-03 09:25:39 +11:00
Doc
13670b4426
SPIGOT-6890: Add repair cost amount in AnvilInventory 2022-01-26 09:30:35 +11:00
md_5
b8a25cbd20
Fix map colour not being marked as a handled tag 2021-12-30 10:14:08 +11:00
Doc
86c91bab1f
SPIGOT-6836: Add more API methods in MerchantRecipe 2021-12-18 11:44:34 +11:00