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",true,false,true));
        materials.put("wood",new Block("wood",false,true,true));
        materials.put("water",new Block("water",true,false,false));
        materials.put("stone",new Block("stone",true,false,false));
        materials.put("snow",new Block("snow",true,false,false));
        materials.put("sand",new Block("sand",true,false,false));

        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"));
    }
}
