public WorldFileHandler(String WorldName,int w,int h,int layers,String name){
		WrittenWorldW=w;
		WrittenWorldH=h;
		WrittenWorldName=name;
		WrittenWorldLayers=layers;
		dir1= new File("res/worlds/"+WorldName);
		dir2= new File("res/worlds/"+WorldName+"/"+name);
		world = new File("res/worlds/"+WorldName+"/"+name+"/map.thu");
		actionBlocks = new File("res/worlds/"+WorldName+"/"+name+"/actblks.thu");
		//System.out.println("Hi");
		if(!world.exists()){
			WrittenBlockID=new int[WrittenWorldLayers][WrittenWorldH][WrittenWorldW];
			try {
				dir1.mkdir();
				dir2.mkdir();
				world.createNewFile();
				fw=new FileWriter(world);
				
				GenerateTiles();
				WriteWorld();
			} catch (IOException e) {
				e.printStackTrace();
			}			
		}
		if(!actionBlocks.exists()){
			try {
				actionBlocks.createNewFile();
				ab=new FileWriter(actionBlocks);
				WriteActionBlocks();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		try {
			ws=new Scanner(world);
			abs = new Scanner(actionBlocks);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		
		ReadInfo();
		ReadBlockID=new int[ReadWorldLayers][ReadWorldH][ReadWorldW];
		ReadActionBlocks();
		ReadWorld();
	}