package net.minecraft.world.level.levelgen.feature.structures;

import com.google.common.collect.Maps;
import net.minecraft.resources.ResourceLocation;
import java.util.Map;

public class StructureTemplatePools {
    private final Map<ResourceLocation, StructureTemplatePool> pools;
    
    public StructureTemplatePools() {
        this.pools = Maps.newHashMap();
        this.register(StructureTemplatePool.EMPTY);
    }
    
    public void register(final StructureTemplatePool cqf) {
        this.pools.put(cqf.getName(), cqf);
    }
    
    public StructureTemplatePool getPool(final ResourceLocation uh) {
        final StructureTemplatePool cqf3 = this.pools.get(uh);
        return (cqf3 != null) ? cqf3 : StructureTemplatePool.INVALID;
    }
}
