package com.mygdx.game.Dimension;

import com.badlogic.gdx.graphics.Texture;

import java.util.HashMap;

public class BlockMaterials {
    public static HashMap<String,Block> materials = new HashMap<>();
    public static HashMap<String,Texture> textures = new HashMap<>();

    //Private so the singleton can't be instantiated
    private BlockMaterials() {}

    public static Texture getTexture(String material) {
        return textures.get(material);
    }

    public static void create(){
        materials.put("grass",new Block("grass"));
        materials.put("wood",new Block("wood"));
        materials.put("water",new Block("water"));
        materials.put("stone",new Block("stone"));
        materials.put("snow",new Block("snow"));
        materials.put("sand",new Block("sand"));
        materials.put("air",new Block("air"));

        textures.put("grass", new Texture("core/assets/grass.png"));
        textures.put("wood", new Texture("core/assets/wood.png"));
        textures.put("water", new Texture("core/assets/water.png"));
        textures.put("stone", new Texture("core/assets/stone.png"));
        textures.put("snow", new Texture("core/assets/snow.png"));
        textures.put("sand", new Texture("core/assets/sand.png"));
        textures.put("air", new Texture("core/assets/air.png"));
    }
}
