package client.init;

import common.dimension.Dimension;
import common.init.DimensionRegistry;

public abstract class DimensionMapping extends DimensionRegistry {
	public static void put(String name, int id, Dimension dim) {
		NAME_MAP.put(name, dim);
		NAMES.put(dim, name);
		ID_MAP.put(id, dim);
		IDS.put(dim, id);
		DIMENSIONS.add(dim);
	}

	public static void remove(int id) {
		Dimension dim = ID_MAP.remove(id);
		if(dim != null) {
			IDS.remove(dim);
			NAME_MAP.remove(NAMES.remove(dim));
			DIMENSIONS.remove(dim);
		}
	}
	
	public static void clear() {
		NAME_MAP.clear();
		NAMES.clear();
		ID_MAP.clear();
		IDS.clear();
		DIMENSIONS.clear();
	}
}
