geforkt von Mirrors/Paper
Move deserialized removed unhandled tags to dedicated removedTags
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
87c3fdad31
Commit
85df4599c9
@ -619,7 +619,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(unhandled));
|
||||
try {
|
||||
NBTTagCompound unhandledTag = NBTCompressedStreamTools.readCompressed(buf, NBTReadLimiter.unlimitedHeap());
|
||||
unhandledTags.copy(DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), unhandledTag).result().get());
|
||||
DataComponentPatch unhandledPatch = DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), unhandledTag).result().get();
|
||||
this.unhandledTags.copy(unhandledPatch);
|
||||
|
||||
for (Entry<DataComponentType<?>, Optional<?>> entry : unhandledPatch.entrySet()) {
|
||||
// Move removed unhandled tags to dedicated removedTags
|
||||
if (!entry.getValue().isPresent()) {
|
||||
DataComponentType<?> key = entry.getKey();
|
||||
|
||||
this.unhandledTags.clear(key);
|
||||
this.removedTags.add(key);
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren