package net.minecraft.server.packs; import java.util.Map; import net.minecraft.server.packs.metadata.MetadataSectionType; public class BuiltInMetadata { private static final BuiltInMetadata EMPTY = new BuiltInMetadata(Map.of()); private final Map, ?> values; private BuiltInMetadata(Map, ?> values) { this.values = values; } public T get(MetadataSectionType type) { return (T)this.values.get(type); } public static BuiltInMetadata of() { return EMPTY; } public static BuiltInMetadata of(MetadataSectionType type, T value) { return new BuiltInMetadata(Map.of(type, value)); } public static BuiltInMetadata of(MetadataSectionType type1, T1 value1, MetadataSectionType type2, T2 value2) { return new BuiltInMetadata(Map.of(type1, value1, type2, value2)); } }