Update extend tags
This commit is contained in:
parent
8534213d72
commit
4b7ac41bdc
@ -19,6 +19,7 @@ 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;
|
||||||
@ -29,36 +30,27 @@ import net.minecraft.nbt.Tag;
|
|||||||
public class CraftMetaItemMixin implements ItemMetaBridge {
|
public class CraftMetaItemMixin implements ItemMetaBridge {
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
@Shadow(remap = false) @Final private Map<String, Tag> unhandledTags;
|
@Shadow @Final Map<String, Tag> unhandledTags;
|
||||||
|
@Shadow @Final private static Set<String> HANDLED_TAGS;
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
private static final Set<String> EXTEND_TAGS = ImmutableSet.of(
|
private static final Set<String> EXTEND_TAGS;
|
||||||
"map_is_scaling",
|
|
||||||
"map",
|
static {
|
||||||
"CustomPotionEffects",
|
EXTEND_TAGS = new HashSet<>(HANDLED_TAGS);
|
||||||
"Potion",
|
EXTEND_TAGS.removeAll(Set.of(
|
||||||
"CustomPotionColor",
|
"display",
|
||||||
"SkullOwner",
|
"CustomModelData",
|
||||||
"SkullProfile",
|
"BlockStateTag",
|
||||||
"EntityTag",
|
"RepairCost",
|
||||||
"BlockEntityTag",
|
"Enchantments",
|
||||||
"title",
|
"HideFlags",
|
||||||
"author",
|
"Unbreakable",
|
||||||
"pages",
|
"Damage",
|
||||||
"resolved",
|
"PublicBukkitValues",
|
||||||
"generation",
|
"AttributeModifiers"
|
||||||
"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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user