General ItemMeta fixes

== AT ==
private-f net/minecraft/world/item/ItemStack components
public net/minecraft/world/food/FoodProperties DEFAULT_EAT_SECONDS
public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V

Co-authored-by: GhastCraftHD <julius.gruenberg@leghast.de>
This commit is contained in:
Jake Potrebic
2024-04-27 20:56:17 -07:00
parent 445e9a65fb
commit 31725bc039
30 changed files with 582 additions and 339 deletions

View File

@@ -94,7 +94,7 @@ public class DeprecatedItemMetaCustomValueTest {
public void testNBTTagStoring() {
CraftMetaItem itemMeta = this.createComplexItemMeta();
CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator();
CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator() {}; // Paper
itemMeta.applyToItem(compound);
assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper

View File

@@ -128,7 +128,7 @@ public class PersistentDataContainerTest {
public void testNBTTagStoring() {
CraftMetaItem itemMeta = this.createComplexItemMeta();
CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator();
CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator() {}; // Paper
itemMeta.applyToItem(compound);
assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper
@@ -474,7 +474,7 @@ public class PersistentDataContainerTest {
assertEquals(List.of(), container.get(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings()));
// Write and read the entire container to NBT
final CraftMetaItem.Applicator storage = new CraftMetaItem.Applicator();
final CraftMetaItem.Applicator storage = new CraftMetaItem.Applicator() {}; // Paper
craftItem.applyToItem(storage);
final CraftMetaItem readItem = new CraftMetaItem(storage.build(), null); // Paper