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

@@ -57,7 +57,19 @@
return nbttagcompound;
}
@@ -234,7 +259,12 @@
@@ -121,6 +146,11 @@
CompoundTag nbttagcompound = new CompoundTag();
this.saveAdditional(nbttagcompound, registries);
+ // Paper start - store PDC here as well
+ if (this.persistentDataContainer != null && !this.persistentDataContainer.isEmpty()) {
+ nbttagcompound.put("PublicBukkitValues", this.persistentDataContainer.toTagCompound());
+ }
+ // Paper end
return nbttagcompound;
}
@@ -234,7 +264,12 @@
public void fillCrashReportCategory(CrashReportCategory crashReportSection) {
crashReportSection.setDetail("Name", this::getNameForReporting);
if (this.level != null) {
@@ -71,7 +83,7 @@
CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.level.getBlockState(this.worldPosition));
}
}
@@ -263,13 +293,19 @@
@@ -263,13 +298,19 @@
}
public final void applyComponents(DataComponentMap defaultComponents, DataComponentPatch components) {
@@ -93,7 +105,7 @@
@Nullable
@Override
public <T> T get(DataComponentType<T> type) {
@@ -284,9 +320,13 @@
@@ -284,9 +325,13 @@
}
});
Objects.requireNonNull(set);
@@ -108,7 +120,7 @@
}
protected void collectImplicitComponents(DataComponentMap.Builder builder) {}
@@ -321,6 +361,30 @@
@@ -321,6 +366,30 @@
}
}