Revert "Update extend tags"

This reverts commit 4b7ac41bdc.
This commit is contained in:
IzzelAliz 2022-02-01 12:57:25 +08:00
parent b78d3af448
commit ef628e4ecd
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338

View File

@ -19,7 +19,6 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@ -30,27 +29,36 @@ import net.minecraft.nbt.Tag;
public class CraftMetaItemMixin implements ItemMetaBridge { public class CraftMetaItemMixin implements ItemMetaBridge {
// @formatter:off // @formatter:off
@Shadow @Final Map<String, Tag> unhandledTags; @Shadow(remap = false) @Final private Map<String, Tag> unhandledTags;
@Shadow @Final private static Set<String> HANDLED_TAGS;
// @formatter:on // @formatter:on
private static final Set<String> EXTEND_TAGS; private static final Set<String> EXTEND_TAGS = ImmutableSet.of(
"map_is_scaling",
static { "map",
EXTEND_TAGS = new HashSet<>(HANDLED_TAGS); "CustomPotionEffects",
EXTEND_TAGS.removeAll(Set.of( "Potion",
"display", "CustomPotionColor",
"CustomModelData", "SkullOwner",
"BlockStateTag", "SkullProfile",
"RepairCost", "EntityTag",
"Enchantments", "BlockEntityTag",
"HideFlags", "title",
"Unbreakable", "author",
"Damage", "pages",
"PublicBukkitValues", "resolved",
"AttributeModifiers" "generation",
)); "Fireworks",
} "StoredEnchantments",
"Explosion",
"Recipes",
"BucketVariantTag",
"Charged",
"ChargedProjectiles",
"Effects",
"LodestoneDimension",
"LodestonePos",
"LodestoneTracked"
);
@ModifyVariable(method = "<init>(Lnet/minecraft/nbt/CompoundTag;)V", at = @At(value = "INVOKE", target = "Lorg/bukkit/UnsafeValues;getDataVersion()I")) @ModifyVariable(method = "<init>(Lnet/minecraft/nbt/CompoundTag;)V", at = @At(value = "INVOKE", target = "Lorg/bukkit/UnsafeValues;getDataVersion()I"))
private CompoundTag arclight$provideTag(CompoundTag tag) { private CompoundTag arclight$provideTag(CompoundTag tag) {