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 cim) {
        this.pools.put(cim.getName(), cim);
    }
    
    public StructureTemplatePool getPool(final ResourceLocation sm) {
        final StructureTemplatePool cim3 = this.pools.get(sm);
        return (cim3 != null) ? cim3 : StructureTemplatePool.INVALID;
    }
}
